This commit is contained in:
sxyazi 2023-09-07 22:52:01 +08:00
parent b6d4bef405
commit 3e6881999f
No known key found for this signature in database

View file

@ -99,7 +99,6 @@ impl Watcher {
}
})
.collect();
guard.sort_unstable_by(|_, a, _, b| b.cmp(a));
let lock = self.watched.clone();
tokio::spawn(async move {
@ -113,9 +112,7 @@ impl Watcher {
}
}
let mut guard = lock.write();
guard.extend(ext);
guard.sort_unstable_by(|_, a, _, b| b.cmp(a));
lock.write().extend(ext);
});
}