Skip to content

Commit

Permalink
rustfmt: single_line_if_else_max_width = 60
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed Oct 8, 2022
1 parent 51c34ec commit aa32edd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 1 addition & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@

inline_attribute_width = 60
overflow_delimited_expr = true
single_line_if_else_max_width = 60
use_field_init_shorthand = true
use_try_shorthand = true
6 changes: 1 addition & 5 deletions crates/kas-theme/src/flat_theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,7 @@ where
b = b * SHADOW_HOVER;
}
let shadow_outer = Quad::from_coords(a + inner.a, b + inner.b);
let col1 = if self.cols.is_dark {
col_frame
} else {
Rgba::BLACK
};
let col1 = if self.cols.is_dark { col_frame } else { Rgba::BLACK };
let mut col2 = col1;
col2.a = 0.0;
self.draw
Expand Down
6 changes: 1 addition & 5 deletions crates/kas-theme/src/shaded_theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,7 @@ where
}

let outer_col = self.cols.background;
let inner_col = if nav_focus {
self.cols.accent_soft
} else {
outer_col
};
let inner_col = if nav_focus { self.cols.accent_soft } else { outer_col };
self.draw
.shaded_square_frame(outer, inner, NORMS_SUNK, outer_col, inner_col);

Expand Down

0 comments on commit aa32edd

Please sign in to comment.