persona drain tests: clippy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-27 21:19:46 +01:00
commit e34315a382

View file

@ -171,8 +171,8 @@ impl Rig {
fn new(deliveries: Vec<ChatDelivery>) -> Self {
let log = Log::default();
let dir = TempDir::new().unwrap();
ControlWriter::open(&dir.path().join("control.cc")).unwrap().set_brake(true, at(0), "op").unwrap();
SwarmWriter::open(&dir.path().join("swarm.cc")).unwrap().set_brake(true, at(0), "op").unwrap();
ControlWriter::open(dir.path().join("control.cc")).unwrap().set_brake(true, at(0), "op").unwrap();
SwarmWriter::open(dir.path().join("swarm.cc")).unwrap().set_brake(true, at(0), "op").unwrap();
let mouth = Rc::new(FakeMouth { held: RefCell::new(deliveries), sent: RefCell::default(), acks: RefCell::default(), reads: Cell::new(0), log: log.clone() });
let store = Rc::new(FakeStore { stored: RefCell::new(control()), puts: RefCell::default(), outside: Cell::new(0), log: log.clone() });
let trace = Rc::new(MemTrace { rows: RefCell::default(), log: log.clone() });
@ -308,7 +308,7 @@ fn t_l2_turn_cap() {
#[test]
fn t_l2_held_brake_touches_nothing() {
let rig = Rig::new(vec![line(1, &room(1), META, "hello")]);
SwarmWriter::open(&rig.dir.path().join("swarm.cc")).unwrap().set_brake(false, at(1), "op").unwrap();
SwarmWriter::open(rig.dir.path().join("swarm.cc")).unwrap().set_brake(false, at(1), "op").unwrap();
assert!(matches!(rig.run(scripted(true)), Outcome::Dead(_)));
assert_eq!((rig.mouth.reads.get(), rig.log().len(), rig.store.puts.borrow().len(), rig.held_seqs()), (0, 0, 0, vec![1]), "no read, no put, no trace, no ack, no send");
}