Skip to content

Commit 616758e

Browse files
committed
refactor: rename macro
_
1 parent c74fec4 commit 616758e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

helix-stdx/src/str.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/// Concatenates strings together.
22
///
3-
/// `concat!(a, " ", b, " ", c)` is:
3+
/// `str_concat!(a, " ", b, " ", c)` is:
44
/// - more performant than `format!("{a} {b} {c}")`
55
/// - more ergonomic than using `String::with_capacity` followed by a series of `String::push_str`
66
#[macro_export]
7-
macro_rules! concat {
7+
macro_rules! str_concat {
88
($($value:expr),*) => {{
99
// Rust does not allow using `+` as separator between value
1010
// so we must add that at the end of everything. The `0` is necessary

helix-stdx/src/time.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@ pub fn format_relative_time(timestamp: i64, timezone_offset: i32) -> String {
7171
"from now"
7272
};
7373

74-
crate::concat!(value, " ", unit, " ", label)
74+
crate::str_concat!(value, " ", unit, " ", label)
7575
}

0 commit comments

Comments
 (0)