(config: &Config, value: &str)
| 46 | } |
| 47 | |
| 48 | pub 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 | |
| 55 | fn normalize_pairing_code(value: &str) -> String { |
| 56 | value.chars().filter(|ch| ch.is_ascii_digit()).collect() |
no test coverage detected