Remove unreachable guard condition in String.asciified() (#4395)

This commit is contained in:
Copilot
2025-08-08 11:31:15 +01:00
committed by GitHub
parent a5d3b0ff77
commit 63aadefd64
2 changed files with 17 additions and 21 deletions
@@ -32,9 +32,6 @@ extension String {
guard !isASCII else {
return self
}
guard !canBeConverted(to: .ascii) else {
return nil
}
let mutableString = NSMutableString(string: self)
guard CFStringTransform(mutableString, nil, "Any-Latin; Latin-ASCII; [:^ASCII:] Remove" as CFString, false) else {
return nil