diff options
author | Aleksey Kladov <[email protected]> | 2020-06-23 20:29:50 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-06-23 20:29:50 +0100 |
commit | ff687453a8a80da29ee7b0b4ad71871ff8b0523e (patch) | |
tree | 3799a6c66e23cfd5885ec074216af2ae2e8ac690 /crates/stdx | |
parent | 9caf810129589327cc614936a97a10cedc6f03a9 (diff) |
Slightly better name
Diffstat (limited to 'crates/stdx')
-rw-r--r-- | crates/stdx/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/stdx/src/lib.rs b/crates/stdx/src/lib.rs index f2ff0e435..100db9d5d 100644 --- a/crates/stdx/src/lib.rs +++ b/crates/stdx/src/lib.rs | |||
@@ -124,7 +124,7 @@ pub fn replace(buf: &mut String, from: char, to: &str) { | |||
124 | *buf = buf.replace(from, to) | 124 | *buf = buf.replace(from, to) |
125 | } | 125 | } |
126 | 126 | ||
127 | pub fn split1(haystack: &str, delim: char) -> Option<(&str, &str)> { | 127 | pub fn split_delim(haystack: &str, delim: char) -> Option<(&str, &str)> { |
128 | let idx = haystack.find(delim)?; | 128 | let idx = haystack.find(delim)?; |
129 | Some((&haystack[..idx], &haystack[idx + delim.len_utf8()..])) | 129 | Some((&haystack[..idx], &haystack[idx + delim.len_utf8()..])) |
130 | } | 130 | } |