Apply NFC normalization. Caller has already run `validate_relative`, which rejects `//` so no slash-collapsing is needed.
(p: &str)
| 59 | /// Apply NFC normalization. Caller has already run `validate_relative`, which |
| 60 | /// rejects `//` so no slash-collapsing is needed. |
| 61 | pub fn normalize(p: &str) -> String { |
| 62 | if is_nfc(p) { |
| 63 | return p.to_string(); |
| 64 | } |
| 65 | p.nfc().collect() |
| 66 | } |
| 67 | |
| 68 | /// Combine validation + normalization into the single call used at write sites. |
| 69 | pub fn check_and_normalize(p: &str) -> Result<String, &'static str> { |
no outgoing calls
no test coverage detected
searching dependent graphs…