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) { fn test_config(config: Config) {
let _watcher = config let _watcher = config
.watch(|config, keys| { .watch(|config, keys| {
println!("Changed: {:?}", keys); println!("Changed: {keys:?}");
for key in keys.iter() { for key in keys.iter() {
println!(" - {} = {:?}", key, config.get::<ron::Value>(key)); println!(" - {} = {:?}", key, config.get::<ron::Value>(key));
} }

View file

@ -263,7 +263,7 @@ impl Window {
fn set_scale_factor(&mut self, factor: f32) { fn set_scale_factor(&mut self, factor: f32) {
self.scale_factor = factor as f64; 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>( fn sub_page_button<Message: Clone + From<Page> + 'static>(

View file

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

View file

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

View file

@ -469,7 +469,7 @@ where
/// Constructs views for other windows. /// Constructs views for other windows.
fn view_window(&self, id: window::Id) -> Element<Self::Message> { fn view_window(&self, id: window::Id) -> Element<Self::Message> {
panic!("no view for window {:?}", id); panic!("no view for window {id:?}");
} }
/// Overrides the default style for applications /// Overrides the default style for applications