减少复制

This commit is contained in:
lubeilin
2023-10-08 20:52:12 +08:00
parent 3ea1250b53
commit 9ad0525216
+1 -1
View File
@@ -503,7 +503,7 @@ impl Context {
pub fn update_read_time(&self, id: &Ipv4Addr, route_key: &RouteKey) {
let guard = &crossbeam_epoch::pin();
let table_share = self.inner.route_table.load(Ordering::Relaxed, guard);
let table = unsafe { table_share.deref().clone() };
let table = unsafe { table_share.deref() };
if let Some(routes) = table.get(id) {
for (route, time) in routes {
if &route.route_key() == route_key {