diff options
author | 2023-02-02 16:52:56 +0100 | |
---|---|---|
committer | 2023-02-02 16:52:56 +0100 | |
commit | a35d6d2e4d59f71309f31c87ea5150959d639185 (patch) | |
tree | efd44456685739bce1962146e66002654c9ecb0e /native/src/debug | |
parent | 49e9a9a5379c1e9a9469045ca9a51ffb860ee620 (diff) | |
parent | 98a717383acf71d7939d7cc90d350743487f0380 (diff) | |
download | iced-a35d6d2e4d59f71309f31c87ea5150959d639185.tar.gz iced-a35d6d2e4d59f71309f31c87ea5150959d639185.tar.bz2 iced-a35d6d2e4d59f71309f31c87ea5150959d639185.zip |
Merge branch 'iced-rs:master' into master
Diffstat (limited to 'native/src/debug')
-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}...") } })); |