aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tor-proto')
-rw-r--r--crates/tor-proto/src/circuit/reactor.rs4
-rw-r--r--crates/tor-proto/src/client/circuit.rs4
-rw-r--r--crates/tor-proto/src/client/reactor/circuit.rs2
-rw-r--r--crates/tor-proto/src/client/reactor/control.rs3
4 files changed, 8 insertions, 5 deletions
diff --git a/crates/tor-proto/src/circuit/reactor.rs b/crates/tor-proto/src/circuit/reactor.rs
index d011fafae..b1f121be4 100644
--- a/crates/tor-proto/src/circuit/reactor.rs
+++ b/crates/tor-proto/src/circuit/reactor.rs
@@ -273,10 +273,10 @@ pub(crate) struct CircReactorHandle<F: ForwardHandler, B: BackwardHandler> {
#[debug(skip)]
pub(crate) command: mpsc::UnboundedSender<CtrlCmd<F::CtrlCmd, B::CtrlCmd>>,
/// The time provider.
- #[expect(unused)] // TODO(relay)
+ #[allow(unused)] // TODO(relay)
pub(crate) time_provider: DynTimeProvider,
/// Memory quota account
- #[expect(unused)] // TODO(relay)
+ #[allow(unused)] // TODO(relay)
pub(crate) memquota: CircuitAccount,
}
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.