From 3e6881999ff7bf328a25938f1710d43be045146c Mon Sep 17 00:00:00 2001 From: sxyazi Date: Thu, 7 Sep 2023 22:52:01 +0800 Subject: [PATCH] .. --- core/src/manager/watcher.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/src/manager/watcher.rs b/core/src/manager/watcher.rs index d0922185..1e6c3fcd 100644 --- a/core/src/manager/watcher.rs +++ b/core/src/manager/watcher.rs @@ -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); }); }