diff options
author | 2023-01-27 13:25:04 -0700 | |
---|---|---|
committer | 2023-01-27 14:02:48 -0700 | |
commit | 42b1bfe66d2407901c1ae640f80ce9e0d3c64b60 (patch) | |
tree | 2057c57df0c36096d1c3cd6334bc16e767f8169e /native/src/debug/basic.rs | |
parent | e6092e81a42efe0bbaaad2e7ce475c25a379e672 (diff) | |
download | iced-42b1bfe66d2407901c1ae640f80ce9e0d3c64b60.tar.gz iced-42b1bfe66d2407901c1ae640f80ce9e0d3c64b60.tar.bz2 iced-42b1bfe66d2407901c1ae640f80ce9e0d3c64b60.zip |
Fix: Clippy lint 'uninlined_format_args'
Diffstat (limited to 'native/src/debug/basic.rs')
-rw-r--r-- | native/src/debug/basic.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/native/src/debug/basic.rs b/native/src/debug/basic.rs index 603f2fd5..92f614da 100644 --- a/native/src/debug/basic.rs +++ b/native/src/debug/basic.rs @@ -133,7 +133,7 @@ impl Debug { } pub fn log_message<Message: std::fmt::Debug>(&mut self, message: &Message) { - self.last_messages.push_back(format!("{:?}", message)); + self.last_messages.push_back(format!("{message:?}")); if self.last_messages.len() > 10 { let _ = self.last_messages.pop_front(); @@ -150,7 +150,7 @@ impl Debug { let mut lines = Vec::new(); fn key_value<T: std::fmt::Debug>(key: &str, value: T) -> String { - format!("{} {:?}", key, value) + format!("{key} {value:?}") } lines.push(format!( @@ -176,9 +176,9 @@ impl Debug { lines.push(String::from("Last messages:")); lines.extend(self.last_messages.iter().map(|msg| { if msg.len() <= 100 { - format!(" {}", msg) + format!(" {msg}") } else { - format!(" {:.100}...", msg) + format!(" {msg:.100}...") } })); |