Skip to content

Commit ef551a5

Browse files
authored
Merge pull request #2389 from dtolnay/trimstart
Replace use of deprecated trim_left_matches with trim_start_matches
2 parents 88d73e5 + 1c5ea24 commit ef551a5

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

serde_derive/src/dummy.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ pub fn wrap_in_const(
3939
}
4040
}
4141

42-
#[allow(deprecated)]
4342
fn unraw(ident: &Ident) -> String {
44-
// str::trim_start_matches was added in 1.30, trim_left_matches deprecated
45-
// in 1.33. We currently support rustc back to 1.15 so we need to continue
46-
// to use the deprecated one.
47-
ident.to_string().trim_left_matches("r#").to_owned()
43+
ident.to_string().trim_start_matches("r#").to_owned()
4844
}

serde_derive/src/internals/attr.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,8 @@ pub struct Name {
141141
deserialize_aliases: Vec<String>,
142142
}
143143

144-
#[allow(deprecated)]
145144
fn unraw(ident: &Ident) -> String {
146-
// str::trim_start_matches was added in 1.30, trim_left_matches deprecated
147-
// in 1.33. We currently support rustc back to 1.15 so we need to continue
148-
// to use the deprecated one.
149-
ident.to_string().trim_left_matches("r#").to_owned()
145+
ident.to_string().trim_start_matches("r#").to_owned()
150146
}
151147

152148
impl Name {

0 commit comments

Comments
 (0)