Avoid unstable feature str_split_once

This commit is contained in:
Luke Street 2022-09-03 08:56:17 -04:00
parent df7d470fe0
commit 12e1844e12
1 changed files with 3 additions and 2 deletions

View File

@ -220,10 +220,11 @@ pub fn demangle(mut str: &str) -> Option<String> {
str = &str[2..]; str = &str[2..];
} }
{ {
let (fn_name_out, rest) = str.split_once("__")?; let idx = str.find("__")?;
let (fn_name_out, rest) = str.split_at(idx);
let (_, qualified) = demange_template_args(fn_name_out)?; let (_, qualified) = demange_template_args(fn_name_out)?;
fn_name = qualified; fn_name = qualified;
str = rest; str = &rest[2..];
} }
let (class_name, mut qualified, rest) = demangle_qualified_class(str)?; let (class_name, mut qualified, rest) = demangle_qualified_class(str)?;
str = rest; str = rest;