We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be14c5c commit d51bd54Copy full SHA for d51bd54
src/session/depot.rs
@@ -180,7 +180,8 @@ impl Depot {
180
}
181
} else {
182
// Overwrite old paths as they could be invalidated after reply.
183
- let count = self.watching_paths.get(&(path, mode)).copied().unwrap_or(0) + 1;
+ // `HashMap::insert` does not update the key in case it is present, so we have to remove it first.
184
+ let count = self.watching_paths.remove(&(path, mode)).unwrap_or(0) + 1;
185
self.watching_paths.insert((path, mode), count);
186
187
0 commit comments