feat(voice): add iOS VAD runtime support

This commit is contained in:
Edison Jwa
2026-05-21 20:51:45 +09:00
parent 171baf6e41
commit 6af4ecab0f
73 changed files with 11529 additions and 1249 deletions
+2 -3
View File
@@ -536,7 +536,7 @@ struct PttBanCheckVisitor {
impl PttBanCheckVisitor {
fn check(&mut self, name: &str) {
if !self.banned && PTT_BANNED_FIELDS.iter().any(|b| *b == name) {
if !self.banned && PTT_BANNED_FIELDS.contains(&name) {
self.banned = true;
}
}
@@ -761,7 +761,6 @@ mod tests {
v.check("key_code"); // banned
assert!(v.banned);
let mut v2 = PttBanCheckVisitor::default();
for name in [
"scan_code",
"virtual_key",
@@ -772,7 +771,7 @@ mod tests {
"key_press_history",
"key_timing",
] {
v2 = PttBanCheckVisitor::default();
let mut v2 = PttBanCheckVisitor::default();
v2.check(name);
assert!(v2.banned, "expected {name} to be banned");
}