Enable clippy::useless_format
(#8758)
This PR enables the [`clippy::useless_format`](https://rust-lang.github.io/rust-clippy/master/index.html#/useless_format) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
373e18bc88
commit
33790b81fc
12 changed files with 70 additions and 46 deletions
|
@ -376,7 +376,7 @@ impl Item for ChannelView {
|
|||
(_, false) => format!("#{} (disconnected)", channel.name),
|
||||
}
|
||||
} else {
|
||||
format!("channel notes (disconnected)")
|
||||
"channel notes (disconnected)".to_string()
|
||||
};
|
||||
Label::new(label)
|
||||
.color(if selected {
|
||||
|
|
|
@ -137,9 +137,9 @@ impl MessageEditor {
|
|||
) {
|
||||
self.editor.update(cx, |editor, cx| {
|
||||
if let Some(channel_name) = channel_name {
|
||||
editor.set_placeholder_text(format!("Message #{}", channel_name), cx);
|
||||
editor.set_placeholder_text(format!("Message #{channel_name}"), cx);
|
||||
} else {
|
||||
editor.set_placeholder_text(format!("Message Channel"), cx);
|
||||
editor.set_placeholder_text("Message Channel", cx);
|
||||
}
|
||||
});
|
||||
self.channel_id = Some(channel_id);
|
||||
|
|
|
@ -952,7 +952,7 @@ impl CollabPanel {
|
|||
})
|
||||
.ok();
|
||||
}))
|
||||
.tooltip(move |cx| Tooltip::text(format!("Open shared screen"), cx))
|
||||
.tooltip(move |cx| Tooltip::text("Open shared screen", cx))
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -2220,7 +2220,7 @@ impl CollabPanel {
|
|||
});
|
||||
|
||||
if let Some(name) = channel_name {
|
||||
SharedString::from(format!("{}", name))
|
||||
SharedString::from(name.to_string())
|
||||
} else {
|
||||
SharedString::from("Current Call")
|
||||
}
|
||||
|
|
|
@ -778,7 +778,7 @@ fn format_timestamp(
|
|||
"just now".to_string()
|
||||
}
|
||||
} else if date.next_day() == Some(today) {
|
||||
format!("yesterday")
|
||||
"yesterday".to_string()
|
||||
} else {
|
||||
format!("{:02}/{}/{}", date.month() as u32, date.day(), date.year())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue