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:
Joscha 2024-03-09 13:49:29 +01:00
parent 0f21c3701e
commit 638a449343
7 changed files with 144 additions and 170 deletions

View file

@ -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
}