diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-10-13 13:10:21 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-10-13 13:10:21 +0200 |
| commit | 7c0899b5373cdc4f1083a0a8515856207c431423 (patch) | |
| tree | ee1ecade4022f1fa3f666feb55097f7bdcae69ed /src/style.rs | |
| parent | 5c04185892947969005ffcf6412d7190dafb3a79 (diff) | |
Run rustfmt 🚿
Diffstat (limited to 'src/style.rs')
| -rw-r--r-- | src/style.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/style.rs b/src/style.rs index b9c37790..3bc1e33f 100644 --- a/src/style.rs +++ b/src/style.rs @@ -4,14 +4,13 @@ use toddle::query::FontClass; use crate::size::{Size, Size2D, SizeBox}; - /// Default styles for text. #[derive(Debug, Clone)] pub struct TextStyle { /// The classes the font we want has to be part of. pub classes: Vec<FontClass>, - /// A sequence of classes. We need the font to be part of at least one of these - /// and preferably the leftmost possible. + /// A sequence of classes. We need the font to be part of at least one of + /// these and preferably the leftmost possible. pub fallback: Vec<FontClass>, /// The font size. pub font_size: f32, @@ -26,13 +25,14 @@ impl TextStyle { /// /// If the class was one of _italic_ or _bold_, then: /// - If it was not present, the _regular_ class will be removed. - /// - If it was present, the _regular_ class will be added in case the - /// other style class is not present. + /// - If it was present, the _regular_ class will be added in case the other + /// style class is not present. pub fn toggle_class(&mut self, class: FontClass) { if self.classes.contains(&class) { self.classes.retain(|x| x != &class); if (class == FontClass::Italic && !self.classes.contains(&FontClass::Bold)) - || (class == FontClass::Bold && !self.classes.contains(&FontClass::Italic)) { + || (class == FontClass::Bold && !self.classes.contains(&FontClass::Italic)) + { self.classes.push(FontClass::Regular); } } else { |
