Skip to content

Commit 5998839

Browse files
committed
Rename table for clarity
1 parent b6f8a5b commit 5998839

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ pub fn nameprep<'a>(s: &'a str) -> Result<Cow<'a, str>, Error> {
130130
.filter(|&c| !tables::commonly_mapped_to_nothing(c))
131131
.collect::<String>();
132132

133-
let mapped = tables::case_fold(&mapped);
133+
let mapped = tables::case_fold_for_nfkc(&mapped);
134134

135135
// 4. Normalization
136136
let normalized = mapped.nfkc().collect::<String>();
@@ -176,7 +176,7 @@ pub fn nodeprep<'a>(s: &'a str) -> Result<Cow<'a, str>, Error> {
176176
.filter(|&c| !tables::commonly_mapped_to_nothing(c))
177177
.collect::<String>();
178178

179-
let mapped = tables::case_fold(&mapped);
179+
let mapped = tables::case_fold_for_nfkc(&mapped);
180180

181181
// A.4. Normalization
182182
let normalized = mapped.nfkc().collect::<String>();

src/tables.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn commonly_mapped_to_nothing(c: char) -> bool {
2525
}
2626

2727
/// B.2 Mapping for case-folding used with NFKC.
28-
pub fn case_fold(s: &str) -> String {
28+
pub fn case_fold_for_nfkc(s: &str) -> String {
2929
let mut result = String::new();
3030

3131
// Each character either maps to a sequence of replacement characters,

0 commit comments

Comments
 (0)