aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/increment/date_time.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core/src/increment/date_time.rs')
-rw-r--r--helix-core/src/increment/date_time.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-core/src/increment/date_time.rs b/helix-core/src/increment/date_time.rs
index 91fa5963..1574bf4d 100644
--- a/helix-core/src/increment/date_time.rs
+++ b/helix-core/src/increment/date_time.rs
@@ -5,6 +5,7 @@ use ropey::RopeSlice;
use std::borrow::Cow;
use std::cmp;
+use std::fmt::Write;
use super::Increment;
use crate::{Range, Tendril};
@@ -162,7 +163,7 @@ impl Format {
fields.push(field);
max_len += field.max_len + remaining[..i].len();
regex += &remaining[..i];
- regex += &format!("({})", field.regex);
+ write!(regex, "({})", field.regex).unwrap();
remaining = &after[spec_len..];
}