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
@@ -62,7 +62,7 @@ struct UdpHolePunchServer {
impl UdpHolePunchServer {
pub fn new(peer_mgr: Arc<PeerManager>) -> Arc<Self> {
let common = Arc::new(PunchHoleServerCommon::new(peer_mgr.clone()));
let common = Arc::new(PunchHoleServerCommon::new(peer_mgr));
let cone_server = PunchConeHoleServer::new(common.clone());
let sym_to_cone_server = PunchSymToConeHoleServer::new(common.clone());
let both_easy_sym_server = PunchBothEasySymHoleServer::new(common.clone());