aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Cui <krazycavin@gmail.com>2020-09-14 12:05:47 +0000
committerKevin Cui <krazycavin@gmail.com>2020-09-14 12:05:47 +0000
commit67fa9745a24f050e37a2ab2cbad24e821f4ff0cd (patch)
tree7328796806fd67f0ecf7032333470f2c2d60ac14
parentShow "now" when last modification time less than 11 seconds (diff)
downloadminiserve-67fa9745a24f050e37a2ab2cbad24e821f4ff0cd.tar.gz
miniserve-67fa9745a24f050e37a2ab2cbad24e821f4ff0cd.zip
Fix wrong use of format
Diffstat (limited to '')
-rw-r--r--src/renderer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/renderer.rs b/src/renderer.rs
index 5298f21..f39cc64 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -915,7 +915,7 @@ fn humanize_systemtime(src_time: Option<SystemTime>) -> Option<String> {
.and_then(|from_now| Duration::from_std(from_now).ok())
.map(|duration| {
if duration < Duration::seconds(11) {
- format!("now")
+ "now".to_string()
} else {
HumanTime::from(duration).to_text_en(Accuracy::Rough, Tense::Past)
}