diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-23 20:30:28 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-23 20:30:28 +0100 |
commit | 846ed08fba1331f1ca8d3512e7536c05784ae4bc (patch) | |
tree | 3799a6c66e23cfd5885ec074216af2ae2e8ac690 /crates/stdx | |
parent | 9caf810129589327cc614936a97a10cedc6f03a9 (diff) | |
parent | ff687453a8a80da29ee7b0b4ad71871ff8b0523e (diff) |
Merge #5012
5012: Slightly better name r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
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 | } |