Skip to content

Commit 6623b58

Browse files
committed
revert naming change
1 parent cd9dd05 commit 6623b58

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/util.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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 {
126126
pub 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

Comments
 (0)