MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / pairing_code_matches

Function pairing_code_matches

packages/server/src/auth.rs:48–53  ·  view source on GitHub ↗
(config: &Config, value: &str)

Source from the content-addressed store, hash-verified

46}
47
48pub fn pairing_code_matches(config: &Config, value: &str) -> bool {
49 let Some(pairing_code) = config.pairing_code.as_deref() else {
50 return false;
51 };
52 normalize_pairing_code(value) == normalize_pairing_code(pairing_code)
53}
54
55fn normalize_pairing_code(value: &str) -> String {
56 value.chars().filter(|ch| ch.is_ascii_digit()).collect()

Callers 1

pair_browserFunction · 0.85

Calls 1

normalize_pairing_codeFunction · 0.85

Tested by

no test coverage detected