chore: apply clippy suggestions
This commit is contained in:
parent
34f55d6720
commit
a27bb5e05d
34 changed files with 116 additions and 146 deletions
|
|
@ -814,7 +814,7 @@ pub struct ThemeBuilder {
|
|||
impl Default for ThemeBuilder {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
palette: DARK_PALETTE.to_owned().into(),
|
||||
palette: DARK_PALETTE.to_owned(),
|
||||
spacing: Spacing::default(),
|
||||
corner_radii: CornerRadii::default(),
|
||||
neutral_tint: Default::default(),
|
||||
|
|
@ -1077,7 +1077,7 @@ impl ThemeBuilder {
|
|||
component_pressed_overlay = component_hovered_overlay;
|
||||
component_pressed_overlay.alpha = 0.2;
|
||||
|
||||
let container = Container::new(
|
||||
Container::new(
|
||||
Component::component(
|
||||
component_base,
|
||||
accent,
|
||||
|
|
@ -1101,9 +1101,7 @@ impl ThemeBuilder {
|
|||
),
|
||||
get_small_widget_color(base_index, 5, &neutral_steps, &control_steps_array[6]),
|
||||
is_high_contrast,
|
||||
);
|
||||
|
||||
container
|
||||
)
|
||||
};
|
||||
|
||||
let accent_text = if is_dark {
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ pub fn get_text(
|
|||
|
||||
let index = get_index(base_index, 70, step_array.len(), is_dark)
|
||||
.or_else(|| get_index(base_index, 50, step_array.len(), is_dark))
|
||||
.unwrap_or_else(|| if is_dark { 99 } else { 0 });
|
||||
.unwrap_or(if is_dark { 99 } else { 0 });
|
||||
|
||||
*step_array.get(index).unwrap_or(fallback)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue