Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
hansl committed Dec 18, 2024
1 parent f2156f5 commit f180ee2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/engine/src/builtins/string/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2146,13 +2146,13 @@ impl String {
// 6. Let ns be the String value that is the result of normalizing S
// into the normalization form named by f as specified in
// https://unicode.org/reports/tr15/.
let arg0 = args.get_or_undefined(0);
let first = args.get_or_undefined(0);
// 3. If form is undefined, let f be "NFC".
let normalization = if arg0.is_undefined() {
let normalization = if first.is_undefined() {
Normalization::Nfc
} else {
// 4. Else, let f be ? ToString(form).
match arg0.to_string(context)? {
match first.to_string(context)? {
ntype if &ntype == "NFC" => Normalization::Nfc,
ntype if &ntype == "NFD" => Normalization::Nfd,
ntype if &ntype == "NFKC" => Normalization::Nfkc,
Expand Down

0 comments on commit f180ee2

Please sign in to comment.