diff options
| -rw-r--r-- | .cargo/config.toml | 2 | ||||
| -rw-r--r-- | examples/arc/src/main.rs | 2 | ||||
| -rw-r--r-- | examples/clock/src/main.rs | 2 | ||||
| -rw-r--r-- | examples/integration/src/controls.rs | 2 | ||||
| -rw-r--r-- | examples/lazy/src/main.rs | 4 | ||||
| -rw-r--r-- | examples/modal/src/main.rs | 6 | ||||
| -rw-r--r-- | examples/scrollable/src/main.rs | 4 | ||||
| -rw-r--r-- | examples/solar_system/src/main.rs | 4 | ||||
| -rw-r--r-- | renderer/src/geometry/cache.rs | 2 | ||||
| -rw-r--r-- | src/settings.rs | 4 | ||||
| -rw-r--r-- | src/window/settings.rs | 2 | ||||
| -rw-r--r-- | style/src/theme.rs | 6 | ||||
| -rw-r--r-- | tiny_skia/src/geometry.rs | 2 | ||||
| -rw-r--r-- | wgpu/src/color.rs | 6 | ||||
| -rw-r--r-- | wgpu/src/text.rs | 2 | ||||
| -rw-r--r-- | widget/src/pick_list.rs | 2 | ||||
| -rw-r--r-- | widget/src/scrollable.rs | 2 | ||||
| -rw-r--r-- | widget/src/toggler.rs | 2 | ||||
| -rw-r--r-- | winit/src/settings.rs | 2 | 
19 files changed, 30 insertions, 28 deletions
diff --git a/.cargo/config.toml b/.cargo/config.toml index 1e55e447..f5c00d9b 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,2 @@  [alias] -lint = "clippy --workspace --no-deps -- -D warnings -D clippy::semicolon_if_nothing_returned -D clippy::trivially-copy-pass-by-ref" +lint = "clippy --workspace --no-deps -- -D warnings -D clippy::semicolon_if_nothing_returned -D clippy::trivially-copy-pass-by-ref -D clippy::default_trait_access" diff --git a/examples/arc/src/main.rs b/examples/arc/src/main.rs index df565859..6a68cca1 100644 --- a/examples/arc/src/main.rs +++ b/examples/arc/src/main.rs @@ -37,7 +37,7 @@ impl Application for Arc {          (              Arc {                  start: Instant::now(), -                cache: Default::default(), +                cache: Cache::default(),              },              Command::none(),          ) diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs index eec70dde..920aa0c5 100644 --- a/examples/clock/src/main.rs +++ b/examples/clock/src/main.rs @@ -35,7 +35,7 @@ impl Application for Clock {              Clock {                  now: time::OffsetDateTime::now_local()                      .unwrap_or_else(|_| time::OffsetDateTime::now_utc()), -                clock: Default::default(), +                clock: Cache::default(),              },              Command::none(),          ) diff --git a/examples/integration/src/controls.rs b/examples/integration/src/controls.rs index 14e53ede..4714c397 100644 --- a/examples/integration/src/controls.rs +++ b/examples/integration/src/controls.rs @@ -19,7 +19,7 @@ impl Controls {      pub fn new() -> Controls {          Controls {              background_color: Color::BLACK, -            text: Default::default(), +            text: String::default(),          }      } diff --git a/examples/lazy/src/main.rs b/examples/lazy/src/main.rs index c6baa6a1..9bf17c56 100644 --- a/examples/lazy/src/main.rs +++ b/examples/lazy/src/main.rs @@ -27,7 +27,7 @@ impl Default for App {                  .into_iter()                  .map(From::from)                  .collect(), -            input: Default::default(), +            input: String::default(),              order: Order::Ascending,          }      } @@ -107,7 +107,7 @@ impl From<&str> for Item {      fn from(s: &str) -> Self {          Self {              name: s.to_owned(), -            color: Default::default(), +            color: Color::default(),          }      }  } diff --git a/examples/modal/src/main.rs b/examples/modal/src/main.rs index c050d3cc..b0e2c81b 100644 --- a/examples/modal/src/main.rs +++ b/examples/modal/src/main.rs @@ -228,7 +228,9 @@ mod modal {      use iced::alignment::Alignment;      use iced::event;      use iced::mouse; -    use iced::{Color, Element, Event, Length, Point, Rectangle, Size}; +    use iced::{ +        BorderRadius, Color, Element, Event, Length, Point, Rectangle, Size, +    };      /// A widget that centers a modal element over some base element      pub struct Modal<'a, Message, Renderer> { @@ -474,7 +476,7 @@ mod modal {              renderer.fill_quad(                  renderer::Quad {                      bounds: layout.bounds(), -                    border_radius: Default::default(), +                    border_radius: BorderRadius::default(),                      border_width: 0.0,                      border_color: Color::TRANSPARENT,                  }, diff --git a/examples/scrollable/src/main.rs b/examples/scrollable/src/main.rs index 21e69284..d82ea841 100644 --- a/examples/scrollable/src/main.rs +++ b/examples/scrollable/src/main.rs @@ -391,12 +391,12 @@ impl scrollable::StyleSheet for ScrollbarCustomStyle {                      .background,                  border_radius: 2.0.into(),                  border_width: 0.0, -                border_color: Default::default(), +                border_color: Color::default(),                  scroller: Scroller {                      color: Color::from_rgb8(250, 85, 134),                      border_radius: 2.0.into(),                      border_width: 0.0, -                    border_color: Default::default(), +                    border_color: Color::default(),                  },              }          } else { diff --git a/examples/solar_system/src/main.rs b/examples/solar_system/src/main.rs index 8fa8946e..8295dded 100644 --- a/examples/solar_system/src/main.rs +++ b/examples/solar_system/src/main.rs @@ -117,8 +117,8 @@ impl State {          let (width, height) = window::Settings::default().size;          State { -            space_cache: Default::default(), -            system_cache: Default::default(), +            space_cache: canvas::Cache::default(), +            system_cache: canvas::Cache::default(),              start: now,              now,              stars: Self::generate_stars(width, height), diff --git a/renderer/src/geometry/cache.rs b/renderer/src/geometry/cache.rs index d82e7f69..d4bb04b3 100644 --- a/renderer/src/geometry/cache.rs +++ b/renderer/src/geometry/cache.rs @@ -35,7 +35,7 @@ impl Cache {      /// Creates a new empty [`Cache`].      pub fn new() -> Self {          Cache { -            state: Default::default(), +            state: RefCell::default(),          }      } diff --git a/src/settings.rs b/src/settings.rs index d9778d7e..c5e28e86 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -77,9 +77,9 @@ where      fn default() -> Self {          Self {              id: None, -            window: Default::default(), +            window: window::Settings::default(),              flags: Default::default(), -            default_font: Default::default(), +            default_font: Font::default(),              default_text_size: Pixels(16.0),              antialiasing: false,              exit_on_close_request: true, diff --git a/src/window/settings.rs b/src/window/settings.rs index 458b9232..0ee573e5 100644 --- a/src/window/settings.rs +++ b/src/window/settings.rs @@ -52,7 +52,7 @@ impl Default for Settings {              transparent: false,              level: Level::default(),              icon: None, -            platform_specific: Default::default(), +            platform_specific: PlatformSpecific::default(),          }      }  } diff --git a/style/src/theme.rs b/style/src/theme.rs index 893d7202..3c1f2de6 100644 --- a/style/src/theme.rs +++ b/style/src/theme.rs @@ -393,7 +393,7 @@ impl container::StyleSheet for Theme {      fn appearance(&self, style: &Self::Style) -> container::Appearance {          match style { -            Container::Transparent => Default::default(), +            Container::Transparent => container::Appearance::default(),              Container::Box => {                  let palette = self.extended_palette(); @@ -904,7 +904,7 @@ impl svg::StyleSheet for Theme {      fn appearance(&self, style: &Self::Style) -> svg::Appearance {          match style { -            Svg::Default => Default::default(), +            Svg::Default => svg::Appearance::default(),              Svg::Custom(custom) => custom.appearance(self),          }      } @@ -1053,7 +1053,7 @@ impl text::StyleSheet for Theme {      fn appearance(&self, style: Self::Style) -> text::Appearance {          match style { -            Text::Default => Default::default(), +            Text::Default => text::Appearance::default(),              Text::Color(c) => text::Appearance { color: Some(c) },          }      } diff --git a/tiny_skia/src/geometry.rs b/tiny_skia/src/geometry.rs index 1d573f6a..1d14aa03 100644 --- a/tiny_skia/src/geometry.rs +++ b/tiny_skia/src/geometry.rs @@ -180,7 +180,7 @@ fn convert_path(path: &Path) -> Option<tiny_skia::Path> {      use iced_graphics::geometry::path::lyon_path;      let mut builder = tiny_skia::PathBuilder::new(); -    let mut last_point = Default::default(); +    let mut last_point = lyon_path::math::Point::default();      for event in path.raw() {          match event { diff --git a/wgpu/src/color.rs b/wgpu/src/color.rs index a1025601..20827e3c 100644 --- a/wgpu/src/color.rs +++ b/wgpu/src/color.rs @@ -12,7 +12,7 @@ pub fn convert(      let sampler = device.create_sampler(&wgpu::SamplerDescriptor {          label: Some("iced_wgpu.offscreen.sampler"), -        ..Default::default() +        ..wgpu::SamplerDescriptor::default()      });      //sampler in 0 @@ -102,10 +102,10 @@ pub fn convert(              primitive: wgpu::PrimitiveState {                  topology: wgpu::PrimitiveTopology::TriangleList,                  front_face: wgpu::FrontFace::Cw, -                ..Default::default() +                ..wgpu::PrimitiveState::default()              },              depth_stencil: None, -            multisample: Default::default(), +            multisample: wgpu::MultisampleState::default(),              multiview: None,          }); diff --git a/wgpu/src/text.rs b/wgpu/src/text.rs index bd4f3e06..2a530cad 100644 --- a/wgpu/src/text.rs +++ b/wgpu/src/text.rs @@ -64,7 +64,7 @@ impl Pipeline {              self.renderers.push(glyphon::TextRenderer::new(                  &mut self.atlas,                  device, -                Default::default(), +                wgpu::MultisampleState::default(),                  None,              ));          } diff --git a/widget/src/pick_list.rs b/widget/src/pick_list.rs index fa0e3471..27f32907 100644 --- a/widget/src/pick_list.rs +++ b/widget/src/pick_list.rs @@ -76,7 +76,7 @@ where              text_line_height: text::LineHeight::default(),              text_shaping: text::Shaping::Basic,              font: None, -            handle: Default::default(), +            handle: Handle::default(),              style: Default::default(),          }      } diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs index 6f1e68fc..4cc97684 100644 --- a/widget/src/scrollable.rs +++ b/widget/src/scrollable.rs @@ -46,7 +46,7 @@ where              id: None,              width: Length::Shrink,              height: Length::Shrink, -            direction: Default::default(), +            direction: Direction::default(),              content: content.into(),              on_scroll: None,              style: Default::default(), diff --git a/widget/src/toggler.rs b/widget/src/toggler.rs index 2440317f..476c8330 100644 --- a/widget/src/toggler.rs +++ b/widget/src/toggler.rs @@ -286,7 +286,7 @@ where                  style,                  label_layout,                  tree.state.downcast_ref(), -                Default::default(), +                crate::text::Appearance::default(),              );          } diff --git a/winit/src/settings.rs b/winit/src/settings.rs index 8d3e1b47..867dad0f 100644 --- a/winit/src/settings.rs +++ b/winit/src/settings.rs @@ -235,7 +235,7 @@ impl Default for Window {              transparent: false,              level: Level::default(),              icon: None, -            platform_specific: Default::default(), +            platform_specific: PlatformSpecific::default(),          }      }  }  | 
