mirror of
https://github.com/sadoyan/aralez.git
synced 2026-04-29 22:38:36 +08:00
Cleanup
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
use dashmap::DashMap;
|
||||
use std::sync::atomic::AtomicUsize;
|
||||
use tokio::sync::{RwLockReadGuard, RwLockWriteGuard};
|
||||
use tokio::sync::RwLockReadGuard;
|
||||
|
||||
/*
|
||||
#[allow(dead_code)]
|
||||
pub fn dashmaps(map1: &RwLockWriteGuard<DashMap<String, (Vec<(String, u16)>, AtomicUsize)>>, map2: &DashMap<String, (Vec<(String, u16)>, AtomicUsize)>) -> bool {
|
||||
if map1.len() != map2.len() {
|
||||
return false; // Different number of keys
|
||||
return false;
|
||||
}
|
||||
for entry1 in map1.iter() {
|
||||
let key = entry1.key();
|
||||
let (vec1, _) = entry1.value(); // Extract value
|
||||
let (vec1, _) = entry1.value();
|
||||
|
||||
if let Some(entry2) = map2.get(key) {
|
||||
let (vec2, _) = entry2.value(); // Correctly extract value
|
||||
let (vec2, _) = entry2.value();
|
||||
if vec1 != vec2 {
|
||||
return false;
|
||||
}
|
||||
@@ -22,6 +23,7 @@ pub fn dashmaps(map1: &RwLockWriteGuard<DashMap<String, (Vec<(String, u16)>, Ato
|
||||
}
|
||||
true
|
||||
}
|
||||
*/
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn dm(map1: &RwLockReadGuard<DashMap<String, (Vec<(String, u16)>, AtomicUsize)>>, map2: &DashMap<String, (Vec<(String, u16)>, AtomicUsize)>) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user