mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-19 08:40:24 +00:00
Slightly better name
This commit is contained in:
parent
9caf810129
commit
ff687453a8
4 changed files with 9 additions and 9 deletions
|
@ -124,7 +124,7 @@ pub fn replace(buf: &mut String, from: char, to: &str) {
|
|||
*buf = buf.replace(from, to)
|
||||
}
|
||||
|
||||
pub fn split1(haystack: &str, delim: char) -> Option<(&str, &str)> {
|
||||
pub fn split_delim(haystack: &str, delim: char) -> Option<(&str, &str)> {
|
||||
let idx = haystack.find(delim)?;
|
||||
Some((&haystack[..idx], &haystack[idx + delim.len_utf8()..]))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue