@@ -73,12 +73,12 @@ impl Case {
7373 }
7474
7575 pub fn sanitize < ' a > ( & self , s : & ' a str ) -> Cow < ' a , str > {
76- let s = sanitize_with_removed_blacklisted ( s) ;
76+ let s = sanitize ( s) ;
7777 self . cow_to_case ( s)
7878 }
7979}
8080
81- fn sanitize_with_removed_blacklisted ( s : & str ) -> Cow < ' _ , str > {
81+ fn sanitize ( s : & str ) -> Cow < ' _ , str > {
8282 if s. contains ( BLACKLIST_CHARS ) {
8383 Cow :: Owned ( s. replace ( BLACKLIST_CHARS , "" ) )
8484 } else {
@@ -101,7 +101,7 @@ impl IdentFormat {
101101 pub fn apply < ' a > ( & self , name : & ' a str ) -> Cow < ' a , str > {
102102 let name = match & self . case {
103103 Some ( case) => case. sanitize ( name) ,
104- _ => sanitize_with_removed_blacklisted ( name) ,
104+ _ => sanitize ( name) ,
105105 } ;
106106 if self . prefix . is_empty ( ) && self . suffix . is_empty ( ) {
107107 name
@@ -126,7 +126,7 @@ impl IdentFormat {
126126pub fn ident_str ( name : & str , fmt : & IdentFormat ) -> String {
127127 let name = match & fmt. case {
128128 Some ( case) => case. sanitize ( name) ,
129- _ => sanitize_with_removed_blacklisted ( name) ,
129+ _ => sanitize ( name) ,
130130 } ;
131131 format ! ( "{}{}{}" , fmt. prefix, name, fmt. suffix)
132132}
0 commit comments