rename add_size to add

This commit is contained in:
René Rössler 2022-02-09 13:26:10 +01:00
parent 8495242f21
commit 28a91fba1f
3 changed files with 5 additions and 5 deletions

View file

@ -31,14 +31,14 @@ impl<'a> GridBuilder<'a> {
/// Add size hint for column/row /// Add size hint for column/row
pub fn size(mut self, size: Size) -> Self { pub fn size(mut self, size: Size) -> Self {
self.sizing.add_size(size); self.sizing.add(size);
self self
} }
/// Add size hint for columns/rows [count] times /// Add size hint for columns/rows [count] times
pub fn sizes(mut self, size: Size, count: usize) -> Self { pub fn sizes(mut self, size: Size, count: usize) -> Self {
for _ in 0..count { for _ in 0..count {
self.sizing.add_size(size); self.sizing.add(size);
} }
self self
} }

View file

@ -27,7 +27,7 @@ impl Sizing {
Self { sizes: vec![] } Self { sizes: vec![] }
} }
pub fn add_size(&mut self, size: Size) { pub fn add(&mut self, size: Size) {
self.sizes.push(size); self.sizes.push(size);
} }

View file

@ -46,14 +46,14 @@ impl<'a> TableBuilder<'a> {
/// Add size hint for column /// Add size hint for column
pub fn column(mut self, width: Size) -> Self { pub fn column(mut self, width: Size) -> Self {
self.sizing.add_size(width); self.sizing.add(width);
self self
} }
/// Add size hint for column [count] times /// Add size hint for column [count] times
pub fn columns(mut self, size: Size, count: usize) -> Self { pub fn columns(mut self, size: Size, count: usize) -> Self {
for _ in 0..count { for _ in 0..count {
self.sizing.add_size(size); self.sizing.add(size);
} }
self self
} }