perf: simplify method signatures and reduce clone across multiple files (#1663)

This commit is contained in:
Tunglies
2025-12-09 16:47:57 +08:00
committed by GitHub
parent 2bc51daa98
commit fe4dff5df0
33 changed files with 62 additions and 81 deletions
+1 -1
View File
@@ -243,7 +243,7 @@ mod tests {
let iterations = 100000;
let peer_group_info =
PeerGroupInfo::generate_with_proof(group_name.clone(), group_secret.clone(), peer_id);
PeerGroupInfo::generate_with_proof(group_name, group_secret.clone(), peer_id);
let start = std::time::Instant::now();
for _ in 0..iterations {
+2 -2
View File
@@ -348,7 +348,7 @@ impl Client {
return Err(err.into());
}
let raw_output = Bytes::from(rpc_resp.response.clone());
let raw_output = Bytes::from(rpc_resp.response);
ctrl.set_raw_output(raw_output.clone());
// Record RPC client RX and duration stats
@@ -372,7 +372,7 @@ impl Client {
}
F::new(HandlerImpl::<F> {
domain_name: domain_name.to_string(),
domain_name,
from_peer_id,
to_peer_id,
zc_packet_sender: self.mpsc.lock().unwrap().get_sink(),