MCPcopy Create free account
hub / github.com/AIScientists-Dev/Flowtrace / normalize

Function normalize

crates/flowtrace-core/src/paths.rs:61–66  ·  view source on GitHub ↗

Apply NFC normalization. Caller has already run `validate_relative`, which rejects `//` so no slash-collapsing is needed.

(p: &str)

Source from the content-addressed store, hash-verified

59/// Apply NFC normalization. Caller has already run `validate_relative`, which
60/// rejects `//` so no slash-collapsing is needed.
61pub 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.
69pub fn check_and_normalize(p: &str) -> Result<String, &'static str> {

Callers 1

check_and_normalizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…