@@ -71,11 +71,8 @@ impl Case {
71
71
} ,
72
72
}
73
73
}
74
- pub fn sanitize < ' a > ( & self , s : & ' a str ) -> Cow < ' a , str > {
75
- self . cow_to_case ( s. into ( ) )
76
- }
77
74
78
- pub fn sanitize_with_blacklist_removal < ' a > ( & self , s : & ' a str ) -> Cow < ' a , str > {
75
+ pub fn sanitize < ' a > ( & self , s : & ' a str ) -> Cow < ' a , str > {
79
76
let s = sanitize_with_removed_blacklisted ( s) ;
80
77
self . cow_to_case ( s)
81
78
}
@@ -103,7 +100,7 @@ pub fn ident(name: &str, config: &Config, fmt: &str, span: Span) -> Ident {
103
100
impl IdentFormat {
104
101
pub fn apply < ' a > ( & self , name : & ' a str ) -> Cow < ' a , str > {
105
102
let name = match & self . case {
106
- Some ( case) => case. sanitize_with_blacklist_removal ( name) ,
103
+ Some ( case) => case. sanitize ( name) ,
107
104
_ => sanitize_with_removed_blacklisted ( name) ,
108
105
} ;
109
106
if self . prefix . is_empty ( ) && self . suffix . is_empty ( ) {
@@ -128,7 +125,7 @@ impl IdentFormat {
128
125
129
126
pub fn ident_str ( name : & str , fmt : & IdentFormat ) -> String {
130
127
let name = match & fmt. case {
131
- Some ( case) => case. sanitize_with_blacklist_removal ( name) ,
128
+ Some ( case) => case. sanitize ( name) ,
132
129
_ => sanitize_with_removed_blacklisted ( name) ,
133
130
} ;
134
131
format ! ( "{}{}{}" , fmt. prefix, name, fmt. suffix)
0 commit comments