diff --git a/crates/tor-chanmgr/src/mgr/map.rs b/crates/tor-chanmgr/src/mgr/map.rs index 7694b648a..bdc775538 100644 --- a/crates/tor-chanmgr/src/mgr/map.rs +++ b/crates/tor-chanmgr/src/mgr/map.rs @@ -70,9 +70,9 @@ impl ChannelState { /// For testing: either give the Open channel inside this state, /// or panic if there is none. #[cfg(test)] - fn unwrap_open(&self) -> C { + fn unwrap_open(&mut self) -> &mut C { match self { - ChannelState::Open(ent) => ent.clone().channel, + ChannelState::Open(ent) => &mut ent.channel, _ => panic!("Not an open channel"), } }