use inline format args (clippy::uninlined_format_args)

This commit is contained in:
Daniel Eades 2023-12-10 16:34:42 +00:00
parent 1ffd464c21
commit 550f6c8284
5 changed files with 5 additions and 5 deletions

View file

@ -6,7 +6,7 @@ use cosmic_config::{Config, ConfigGet, ConfigSet};
fn test_config(config: Config) {
let _watcher = config
.watch(|config, keys| {
println!("Changed: {:?}", keys);
println!("Changed: {keys:?}");
for key in keys.iter() {
println!(" - {} = {:?}", key, config.get::<ron::Value>(key));
}

View file

@ -263,7 +263,7 @@ impl Window {
fn set_scale_factor(&mut self, factor: f32) {
self.scale_factor = factor as f64;
self.scale_factor_string = format!("{:.2}", factor);
self.scale_factor_string = format!("{factor:.2}");
}
fn sub_page_button<Message: Clone + From<Page> + 'static>(

View file

@ -229,7 +229,7 @@ impl State {
column![].spacing(10).align_items(Alignment::Center),
|row, theme| {
row.push(radio(
format!("{:?}", theme),
format!("{theme:?}"),
theme,
if ThemeVariant::from(&window.theme.theme_type) == theme {
Some(theme)

View file

@ -103,7 +103,7 @@ impl cosmic::Application for MultiWindow {
self.windows.insert(
id,
Window {
input_id: id::Id::new(format!("window_{}", count)),
input_id: id::Id::new(format!("window_{count}")),
input_value: String::new(),
},
);