mirror of
https://github.com/helix-editor/helix.git
synced 2025-04-05 11:57:43 +03:00
perf: use string preallocations for string concatenation
This commit is contained in:
parent
af3b670de6
commit
95344a9585
3 changed files with 20 additions and 1 deletions
|
@ -71,5 +71,5 @@ pub fn format_relative_time(timestamp: i64, timezone_offset: i32) -> String {
|
|||
"from now"
|
||||
};
|
||||
|
||||
format!("{value} {unit} {label}")
|
||||
crate::concat!(value, " ", unit, " ", label)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue