mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-05-10 04:07:56 +00:00
Work around deprecation of str::trim_left_matches
This commit is contained in:
@@ -95,7 +95,11 @@ pub struct Name {
|
||||
deserialize: 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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user