We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78c7a5e commit 70431deCopy full SHA for 70431de
fyi_msg/src/msg/mod.rs
@@ -690,12 +690,9 @@ impl Msg {
690
pub fn set_timestamp(&mut self, enabled: bool) {
691
if enabled {
692
let now = utc2k::FmtUtc2k::now_local();
693
- let now_s = now.as_str();
694
- let mut out = String::with_capacity(24 + now_s.len());
695
- out.push_str(csi!(dim));
696
- out.push('[');
697
- out.push_str(csi!(reset, blue));
698
- out.push_str(now_s);
+ let mut out = String::with_capacity(43);
+ out.push_str(concat!(csi!(dim), "[", csi!(reset, blue)));
+ out.push_str(now.as_str());
699
out.push_str(concat!(ansi!((reset, dim) "]"), " "));
700
self.replace_part(TocId::Timestamp, &out);
701
}
0 commit comments