Make naming scheme more consistent
Constructor functions that set/overwrite a value are called with_*, functions that add a value are called and_*.
This commit is contained in:
parent
0f21c3701e
commit
638a449343
7 changed files with 144 additions and 170 deletions
|
|
@ -16,12 +16,12 @@ impl Block {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn border(mut self, color: Srgba) -> Self {
|
||||
pub fn with_border(mut self, color: Srgba) -> Self {
|
||||
self.border = color;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn background(mut self, color: Srgba) -> Self {
|
||||
pub fn with_background(mut self, color: Srgba) -> Self {
|
||||
self.background = color;
|
||||
self
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue