diff options
| author | 2025-02-21 01:22:56 +0100 | |
|---|---|---|
| committer | 2025-02-21 01:37:13 +0100 | |
| commit | 9ceb467e6e12129b42d67a4a1ff3cb21bc7daadd (patch) | |
| tree | dd8a9407058915c152ce6544ba20b75240ca85be /core | |
| parent | 28caeccf22d163e9014b5ed26334b6085683a28b (diff) | |
| download | iced-9ceb467e6e12129b42d67a4a1ff3cb21bc7daadd.tar.gz iced-9ceb467e6e12129b42d67a4a1ff3cb21bc7daadd.tar.bz2 iced-9ceb467e6e12129b42d67a4a1ff3cb21bc7daadd.zip | |
Run `cargo fmt`
Diffstat (limited to 'core')
| -rw-r--r-- | core/src/background.rs | 2 | ||||
| -rw-r--r-- | core/src/color.rs | 8 | ||||
| -rw-r--r-- | core/src/keyboard/event.rs | 2 | ||||
| -rw-r--r-- | core/src/shell.rs | 2 | ||||
| -rw-r--r-- | core/src/theme/palette.rs | 2 | ||||
| -rw-r--r-- | core/src/widget/operation/focusable.rs | 4 | ||||
| -rw-r--r-- | core/src/widget/operation/text_input.rs | 4 | ||||
| -rw-r--r-- | core/src/window/settings.rs | 2 | 
8 files changed, 11 insertions, 15 deletions
| diff --git a/core/src/background.rs b/core/src/background.rs index c8b7cbea..1f665ef4 100644 --- a/core/src/background.rs +++ b/core/src/background.rs @@ -1,5 +1,5 @@ -use crate::gradient::{self, Gradient};  use crate::Color; +use crate::gradient::{self, Gradient};  /// The background of some element.  #[derive(Debug, Clone, Copy, PartialEq)] diff --git a/core/src/color.rs b/core/src/color.rs index a2e076ae..a9183776 100644 --- a/core/src/color.rs +++ b/core/src/color.rs @@ -227,12 +227,8 @@ macro_rules! color {      ($r:expr, $g:expr, $b:expr) => {          $crate::Color::from_rgb8($r, $g, $b)      }; -    ($r:expr, $g:expr, $b:expr, $a:expr) => {{ -        $crate::Color::from_rgba8($r, $g, $b, $a) -    }}; -    ($hex:expr) => {{ -        $crate::color!($hex, 1.0) -    }}; +    ($r:expr, $g:expr, $b:expr, $a:expr) => {{ $crate::Color::from_rgba8($r, $g, $b, $a) }}; +    ($hex:expr) => {{ $crate::color!($hex, 1.0) }};      ($hex:expr, $a:expr) => {{          let hex = $hex as u32; diff --git a/core/src/keyboard/event.rs b/core/src/keyboard/event.rs index 6e483f5b..88c57b21 100644 --- a/core/src/keyboard/event.rs +++ b/core/src/keyboard/event.rs @@ -1,6 +1,6 @@ +use crate::SmolStr;  use crate::keyboard::key;  use crate::keyboard::{Key, Location, Modifiers}; -use crate::SmolStr;  /// A keyboard event.  /// diff --git a/core/src/shell.rs b/core/src/shell.rs index 56250e2e..e3fcdf89 100644 --- a/core/src/shell.rs +++ b/core/src/shell.rs @@ -1,6 +1,6 @@ +use crate::InputMethod;  use crate::event;  use crate::window; -use crate::InputMethod;  /// A connection to the state of a shell.  /// diff --git a/core/src/theme/palette.rs b/core/src/theme/palette.rs index b69f99b1..b4acaa83 100644 --- a/core/src/theme/palette.rs +++ b/core/src/theme/palette.rs @@ -1,5 +1,5 @@  //! Define the colors of a theme. -use crate::{color, Color}; +use crate::{Color, color};  use palette::color_difference::Wcag21RelativeContrast;  use palette::rgb::Rgb; diff --git a/core/src/widget/operation/focusable.rs b/core/src/widget/operation/focusable.rs index a1327bc1..1ee41244 100644 --- a/core/src/widget/operation/focusable.rs +++ b/core/src/widget/operation/focusable.rs @@ -1,7 +1,7 @@  //! Operate on widgets that can be focused. -use crate::widget::operation::{self, Operation, Outcome}; -use crate::widget::Id;  use crate::Rectangle; +use crate::widget::Id; +use crate::widget::operation::{self, Operation, Outcome};  /// The internal state of a widget that can be focused.  pub trait Focusable { diff --git a/core/src/widget/operation/text_input.rs b/core/src/widget/operation/text_input.rs index a46f1a2d..efb2a4d3 100644 --- a/core/src/widget/operation/text_input.rs +++ b/core/src/widget/operation/text_input.rs @@ -1,7 +1,7 @@  //! Operate on widgets that have text input. -use crate::widget::operation::Operation; -use crate::widget::Id;  use crate::Rectangle; +use crate::widget::Id; +use crate::widget::operation::Operation;  /// The internal state of a widget that has text input.  pub trait TextInput { diff --git a/core/src/window/settings.rs b/core/src/window/settings.rs index 9432eaaa..94bcfd78 100644 --- a/core/src/window/settings.rs +++ b/core/src/window/settings.rs @@ -24,8 +24,8 @@ mod platform;  #[path = "settings/other.rs"]  mod platform; -use crate::window::{Icon, Level, Position};  use crate::Size; +use crate::window::{Icon, Level, Position};  pub use platform::PlatformSpecific; | 
