@@ -71,11 +71,8 @@ impl Case {
7171 } ,
7272 }
7373 }
74- pub fn sanitize < ' a > ( & self , s : & ' a str ) -> Cow < ' a , str > {
75- self . cow_to_case ( s. into ( ) )
76- }
7774
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 > {
7976 let s = sanitize_with_removed_blacklisted ( s) ;
8077 self . cow_to_case ( s)
8178 }
@@ -103,7 +100,7 @@ pub fn ident(name: &str, config: &Config, fmt: &str, span: Span) -> Ident {
103100impl IdentFormat {
104101 pub fn apply < ' a > ( & self , name : & ' a str ) -> Cow < ' a , str > {
105102 let name = match & self . case {
106- Some ( case) => case. sanitize_with_blacklist_removal ( name) ,
103+ Some ( case) => case. sanitize ( name) ,
107104 _ => sanitize_with_removed_blacklisted ( name) ,
108105 } ;
109106 if self . prefix . is_empty ( ) && self . suffix . is_empty ( ) {
@@ -128,7 +125,7 @@ impl IdentFormat {
128125
129126pub fn ident_str ( name : & str , fmt : & IdentFormat ) -> String {
130127 let name = match & fmt. case {
131- Some ( case) => case. sanitize_with_blacklist_removal ( name) ,
128+ Some ( case) => case. sanitize ( name) ,
132129 _ => sanitize_with_removed_blacklisted ( name) ,
133130 } ;
134131 format ! ( "{}{}{}" , fmt. prefix, name, fmt. suffix)
0 commit comments