Persona K51: the words gate's catch loop reads gated inside the loop (borrow fix)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
505d2ace66
commit
27aa90fe18
1 changed files with 2 additions and 2 deletions
|
|
@ -1334,8 +1334,8 @@ fn held_gate(answer: &Answer, packet: &Packet, opening: &[(String, Option<String
|
|||
let enters = into.iter().any(|(draft, _)| same_words(&draft.text, &h.text) || (long(&draft.text) && heard_overlap(&draft.text, &h.text) >= ECHO_OVERLAP)) || (long(&h.text) && heard_overlap(&h.text, &union) >= ECHO_OVERLAP);
|
||||
let mut caught: Vec<HeldText> = Vec::new();
|
||||
if enters {
|
||||
for (draft, _) in into.iter().filter(|(draft, _)| !gated.contains_key(&(room.clone(), draft.n))) {
|
||||
if same_words(&draft.text, &h.text) || heard_overlap(&draft.text, &h.text) > 0.0 {
|
||||
for (draft, _) in &into {
|
||||
if !gated.contains_key(&(room.clone(), draft.n)) && (same_words(&draft.text, &h.text) || heard_overlap(&draft.text, &h.text) > 0.0) {
|
||||
gated.insert((room.clone(), draft.n), h.hold.clone());
|
||||
caught.push(HeldText { text: draft.text.clone(), hold: h.hold.clone(), made: h.made });
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue