mirror of
https://github.com/serde-rs/serde.git
synced 2025-09-28 21:41:24 +00:00
Merge pull request #2389 from dtolnay/trimstart
Replace use of deprecated trim_left_matches with trim_start_matches
This commit is contained in:
commit
ef551a517c
@ -39,10 +39,6 @@ pub fn wrap_in_const(
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
fn unraw(ident: &Ident) -> String {
|
||||
// str::trim_start_matches was added in 1.30, trim_left_matches deprecated
|
||||
// in 1.33. We currently support rustc back to 1.15 so we need to continue
|
||||
// to use the deprecated one.
|
||||
ident.to_string().trim_left_matches("r#").to_owned()
|
||||
ident.to_string().trim_start_matches("r#").to_owned()
|
||||
}
|
||||
|
@ -141,12 +141,8 @@ pub struct Name {
|
||||
deserialize_aliases: Vec<String>,
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
fn unraw(ident: &Ident) -> String {
|
||||
// str::trim_start_matches was added in 1.30, trim_left_matches deprecated
|
||||
// in 1.33. We currently support rustc back to 1.15 so we need to continue
|
||||
// to use the deprecated one.
|
||||
ident.to_string().trim_left_matches("r#").to_owned()
|
||||
ident.to_string().trim_start_matches("r#").to_owned()
|
||||
}
|
||||
|
||||
impl Name {
|
||||
|
Loading…
x
Reference in New Issue
Block a user