Remove if-not-else patterns (#10402)
This commit is contained in:
@@ -233,11 +233,11 @@ impl FoldMap {
|
||||
}
|
||||
|
||||
pub fn set_ellipses_color(&mut self, color: Hsla) -> bool {
|
||||
if self.ellipses_color != Some(color) {
|
||||
if self.ellipses_color == Some(color) {
|
||||
false
|
||||
} else {
|
||||
self.ellipses_color = Some(color);
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -126,12 +126,12 @@ impl WrapMap {
|
||||
) -> bool {
|
||||
let font_with_size = (font, font_size);
|
||||
|
||||
if font_with_size != self.font_with_size {
|
||||
if font_with_size == self.font_with_size {
|
||||
false
|
||||
} else {
|
||||
self.font_with_size = font_with_size;
|
||||
self.rewrap(cx);
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user