Fix clippy::default_trait_access

This commit is contained in:
Héctor Ramón Jiménez 2023-09-20 04:51:08 +02:00
parent 6c386e90a1
commit 42ed90bc6f
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
19 changed files with 30 additions and 28 deletions

View file

@ -37,7 +37,7 @@ impl Application for Arc {
(
Arc {
start: Instant::now(),
cache: Default::default(),
cache: Cache::default(),
},
Command::none(),
)

View file

@ -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(),
)

View file

@ -19,7 +19,7 @@ impl Controls {
pub fn new() -> Controls {
Controls {
background_color: Color::BLACK,
text: Default::default(),
text: String::default(),
}
}

View file

@ -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(),
}
}
}

View file

@ -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,
},

View file

@ -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 {

View file

@ -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),