Skip to content

Commit

Permalink
clippy changes
Browse files Browse the repository at this point in the history
  • Loading branch information
genusistimelord committed Feb 20, 2024
1 parent d3e6a90 commit 2671392
Show file tree
Hide file tree
Showing 30 changed files with 2 additions and 34 deletions.
1 change: 0 additions & 1 deletion src/native/badge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! *This API requires the following crate features to be activated: badge*
use iced::{
self,
advanced::{
layout::{Limits, Node},
renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use crate::graphics::icons::{icon_to_string, BootstrapIcon, BOOTSTRAP_FONT};

use iced::{
self,
advanced::{
layout::{Limits, Node},
renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/color_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use super::overlay::color_picker::{
};

use iced::{
self,
advanced::{
layout::{Limits, Node},
overlay, renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/context_menu.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! A context menu for showing actions on right click.
//!
use iced::{
self,
advanced::{
layout::{Limits, Node},
overlay, renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/cupertino/cupertino_button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::graphics::SF_UI_ROUNDED;
use crate::native::cupertino::cupertino_colors::{secondary_system_fill, system_blue};

use iced::{
self,
advanced::{
layout::{Limits, Node},
renderer::{self, Quad},
Expand Down
1 change: 0 additions & 1 deletion src/native/cupertino/cupertino_spinner.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use iced::{
self,
advanced::{
graphics::geometry::Renderer as _,
layout::{Limits, Node},
Expand Down
1 change: 0 additions & 1 deletion src/native/cupertino/cupertino_switch.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::native::cupertino::cupertino_colors::{secondary_system_fill, system_green};

use iced::{
self,
advanced::{
graphics::geometry::Renderer as _,
layout::{self, Limits, Node},
Expand Down
1 change: 0 additions & 1 deletion src/native/date_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use super::overlay::date_picker::{self, DatePickerOverlay, DatePickerOverlayButt

use chrono::Local;
use iced::{
self,
advanced::{
layout::{Limits, Node},
renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/drop_down.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! *This API requires the following crate features to be activated: `drop_down`*
use iced::{
self,
advanced::{
layout::{Limits, Node},
overlay, renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/floating_element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use super::overlay::floating_element::FloatingElementOverlay;

use iced::{
self,
advanced::{
layout::{Limits, Node},
overlay, renderer,
Expand Down
2 changes: 1 addition & 1 deletion src/native/grid/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ fn minimum_row_column_sizes<Message, Theme, Renderer>(
#[allow(clippy::option_if_let_else)]
match column_widths.get_mut(col_idx) {
Some(col_width) => {
*col_width = max_allowed_size.width.min(col_width.max(min_width))
*col_width = max_allowed_size.width.min(col_width.max(min_width));
}
None => column_widths.insert(col_idx, max_allowed_size.width.min(min_width)),
}
Expand Down
1 change: 0 additions & 1 deletion src/native/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use super::overlay::modal::ModalOverlay;

use iced::{
self,
advanced::{
layout::{Limits, Node},
overlay, renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/number_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//!
//! A [`NumberInput`] has some local [`State`].
use iced::{
self,
advanced::{
layout::{Limits, Node},
renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/overlay/color_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use crate::{
};

use iced::{
self,
advanced::{
graphics::geometry::Renderer as _,
layout::{Limits, Node},
Expand Down
1 change: 0 additions & 1 deletion src/native/overlay/context_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::context_menu;
use crate::style::context_menu::StyleSheet;

use iced::{
self,
advanced::{
layout::{Limits, Node},
overlay, renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/overlay/date_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use crate::{

use chrono::{Datelike, Local, NaiveDate};
use iced::{
self,
advanced::{
layout::{Limits, Node},
overlay, renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/overlay/floating_element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use crate::native::floating_element::{Anchor, Offset};

use iced::{
self,
advanced::{
layout::{Limits, Node},
overlay, renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/overlay/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! *This API requires the following crate features to be activated: modal*
use crate::style::modal::StyleSheet;
use iced::{
self,
advanced::{
layout::{Limits, Node},
renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/overlay/time_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use crate::{

use chrono::{Duration, Local, NaiveTime, Timelike};
use iced::{
self,
advanced::{
graphics::geometry::Renderer as _,
layout::{Limits, Node},
Expand Down
1 change: 0 additions & 1 deletion src/native/quad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use crate::native::InnerBounds;
use iced::{
self,
advanced::{
layout::{Limits, Node},
renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/segmented_button.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Create choices using `segnmented_button` buttons.
use iced::{
self,
advanced::{
layout::{Limits, Node},
renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/selection_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pub mod list;
use crate::style::selection_list::StyleSheet;

use iced::{
self,
advanced::{
graphics,
layout::{Limits, Node},
Expand Down
6 changes: 1 addition & 5 deletions src/native/selection_list/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use crate::selection_list::StyleSheet;

use iced::{
self,
advanced::{
layout::{Limits, Node},
renderer,
Expand Down Expand Up @@ -222,10 +221,7 @@ where
let list_state = state.state.downcast_ref::<ListState>();

for i in start..end.min(self.options.len()) {
let is_selected = list_state
.last_selected_index
.map(|u| u.0 == i)
.unwrap_or_default();
let is_selected = list_state.last_selected_index.is_some_and(|u| u.0 == i);
let is_hovered = list_state.hovered_option == Some(i);

let bounds = Rectangle {
Expand Down
1 change: 0 additions & 1 deletion src/native/slide_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! *This API requires the following crate features to be activated: `quad`*
use iced::{
self,
advanced::{
layout::{Limits, Node},
renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/spinner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use crate::style::spinner::StyleSheet;

use iced::{
self,
advanced::{
layout::{Limits, Node},
renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! *This API requires the following crate features to be activated: split*
use iced::{
self,
advanced::{
layout::{Limits, Node},
overlay, renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/tab_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pub mod tab_label;
use crate::graphics::icons::{icon_to_string, BootstrapIcon, BOOTSTRAP_FONT};

use iced::{
self,
advanced::{
layout::{Limits, Node},
renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/tabs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ pub use crate::tab_bar::Position;
use crate::{native::tab_bar::TabBar, style::tab_bar::StyleSheet, TabLabel};

use iced::{
self,
advanced::{
layout::{Limits, Node},
overlay, renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/time_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use super::overlay::time_picker::{self, TimePickerOverlay, TimePickerOverlayButt

use chrono::Local;
use iced::{
self,
advanced::{
layout::{Limits, Node},
overlay, renderer,
Expand Down
1 change: 0 additions & 1 deletion src/native/wrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//!
//! *This API requires the following crate features to be activated: `wrap`*
use iced::{
self,
advanced::{
layout::{Limits, Node},
overlay, renderer,
Expand Down

0 comments on commit 2671392

Please sign in to comment.