diff options
Diffstat (limited to 'crates/tor-proto/src/client')
| -rw-r--r-- | crates/tor-proto/src/client/circuit.rs | 4 | ||||
| -rw-r--r-- | crates/tor-proto/src/client/reactor/circuit.rs | 2 | ||||
| -rw-r--r-- | crates/tor-proto/src/client/reactor/control.rs | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/crates/tor-proto/src/client/circuit.rs b/crates/tor-proto/src/client/circuit.rs index a0c26933e..3ee72420d 100644 --- a/crates/tor-proto/src/client/circuit.rs +++ b/crates/tor-proto/src/client/circuit.rs @@ -1418,7 +1418,7 @@ pub(crate) mod test { fwd_lasthop: idx == last_hop_num, rev_lasthop: idx == u8::from(next_msg_from), peer_id, - params: params.clone(), + params: Box::new(params.clone()), done: tx, }) .unwrap(); @@ -1550,6 +1550,8 @@ pub(crate) mod test { // Do the path accessors report a reasonable outcome? { let path = circ.single_path().unwrap(); + // Without the 'hs-common' feature, clippy would prefer a `map()`. + #[allow(clippy::unnecessary_filter_map)] let path = path .all_hops() .filter_map(|hop| match hop { diff --git a/crates/tor-proto/src/client/reactor/circuit.rs b/crates/tor-proto/src/client/reactor/circuit.rs index 72127db3a..d49c500db 100644 --- a/crates/tor-proto/src/client/reactor/circuit.rs +++ b/crates/tor-proto/src/client/reactor/circuit.rs @@ -749,7 +749,7 @@ impl Circuit { return self.handle_incoming_stream_request(handlers, msg, streamid, hopnum, leg); } else { return Err( - Error::CircProto(format!("Cannot handle {} cells on this circuit", msg.cmd())).into(), + Error::CircProto(format!("Cannot handle {} cells on this circuit", msg.cmd())), ); } } diff --git a/crates/tor-proto/src/client/reactor/control.rs b/crates/tor-proto/src/client/reactor/control.rs index 48a7a75c2..e600bc161 100644 --- a/crates/tor-proto/src/client/reactor/control.rs +++ b/crates/tor-proto/src/client/reactor/control.rs @@ -267,7 +267,8 @@ pub(crate) enum CtrlCmd { fwd_lasthop: bool, rev_lasthop: bool, peer_id: path::HopDetail, - params: CircParameters, + // `CircParameters` is large and this command is test-only, so we box it. + params: Box<CircParameters>, done: ReactorResultChannel<()>, }, /// (tests only) Get the send window and expected tags for a given hop. |
