Fix clippy lints for Rust 1.88 🎉
This commit is contained in:
parent
c952ea8485
commit
8578a1362b
8 changed files with 16 additions and 17 deletions
|
|
@ -166,7 +166,7 @@ impl<Message> canvas::Program<Message> for Clock {
|
|||
let y = radius * angle.0.sin();
|
||||
|
||||
frame.fill_text(canvas::Text {
|
||||
content: format!("{}", hour),
|
||||
content: format!("{hour}"),
|
||||
size: (radius / 5.0).into(),
|
||||
position: Point::new(x * 0.82, y * 0.82),
|
||||
color: palette.secondary.strong.text,
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ impl Example {
|
|||
impl Window {
|
||||
fn new(count: usize) -> Self {
|
||||
Self {
|
||||
title: format!("Window_{}", count),
|
||||
title: format!("Window_{count}"),
|
||||
scale_input: "1.0".to_string(),
|
||||
current_scale: 1.0,
|
||||
theme: Theme::ALL[count % Theme::ALL.len()].clone(),
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ impl Example {
|
|||
|png_result| match png_result {
|
||||
Ok(path) => format!("Png saved as: {path:?}!"),
|
||||
Err(PngError(error)) => {
|
||||
format!("Png could not be saved due to:\n{}", error)
|
||||
format!("Png could not be saved due to:\n{error}")
|
||||
}
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -613,12 +613,11 @@ mod toast {
|
|||
&self.viewport,
|
||||
renderer,
|
||||
)
|
||||
.max(
|
||||
cursor
|
||||
.is_over(layout.bounds())
|
||||
.then_some(mouse::Interaction::Idle)
|
||||
.unwrap_or_default(),
|
||||
)
|
||||
.max(if cursor.is_over(layout.bounds()) {
|
||||
mouse::Interaction::Idle
|
||||
} else {
|
||||
Default::default()
|
||||
})
|
||||
})
|
||||
.max()
|
||||
.unwrap_or_default()
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ impl Tour {
|
|||
Screen::End => "End",
|
||||
};
|
||||
|
||||
format!("{} - Iced", screen)
|
||||
format!("{screen} - Iced")
|
||||
}
|
||||
|
||||
fn update(&mut self, event: Message) {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ impl Compositor {
|
|||
let adapter = instance
|
||||
.request_adapter(&adapter_options)
|
||||
.await
|
||||
.ok_or(Error::NoAdapterFound(format!("{:?}", adapter_options)))?;
|
||||
.ok_or(Error::NoAdapterFound(format!("{adapter_options:?}")))?;
|
||||
|
||||
log::info!("Selected: {:#?}", adapter.get_info());
|
||||
|
||||
|
|
|
|||
|
|
@ -297,11 +297,11 @@ where
|
|||
}
|
||||
|
||||
fn drag_enabled(&self) -> bool {
|
||||
self.internal
|
||||
.maximized()
|
||||
.is_none()
|
||||
.then(|| self.on_drag.is_some())
|
||||
.unwrap_or_default()
|
||||
if self.internal.maximized().is_none() {
|
||||
self.on_drag.is_some()
|
||||
} else {
|
||||
Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
fn grid_interaction(
|
||||
|
|
|
|||
|
|
@ -810,7 +810,7 @@ async fn run_instance<P>(
|
|||
Err(error) => match error {
|
||||
// This is an unrecoverable error.
|
||||
compositor::SurfaceError::OutOfMemory => {
|
||||
panic!("{:?}", error);
|
||||
panic!("{error:?}");
|
||||
}
|
||||
_ => {
|
||||
present_span.finish();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue