summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuvi Panda <yuvipanda@gmail.com>2021-05-10 03:03:57 +0530
committerGitHub <noreply@github.com>2021-05-09 22:33:57 +0100
commitf0463326fa456c96c78e4d3f78106d0312fec588 (patch)
tree3797a89845bc65c799333c5037f228f10b5959ea
parentc16a26cdbfdfcbd15549165b08b2c4c80eecc3f0 (diff)
Use format! instead of string concat (#94)
Cleaner
-rw-r--r--src/command/search.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/command/search.rs b/src/command/search.rs
index e0763822..f8a4a1ba 100644
--- a/src/command/search.rs
+++ b/src/command/search.rs
@@ -94,7 +94,7 @@ impl State {
let (duration, mut ago) = durations[i].clone();
while (duration.len() + ago.len()) < max_length {
- ago = " ".to_owned() + ago.as_str();
+ ago = format!(" {}", ago);
}
let duration = Span::styled(