Explorar o código

Rename a lock to _guard to make sure it is not dropped immediately.

Jing Yang %!s(int64=4) %!d(string=hai) anos
pai
achega
4c4c7f00df
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/snapshot.rs

+ 1 - 1
src/snapshot.rs

@@ -64,7 +64,7 @@ impl SnapshotDaemon {
         self.trigger();
         // Acquire the lock to make sure the daemon thread either has been
         // waiting on the condition, or has not checked `keep_running` yet.
-        let _ = self.current_snapshot.0.lock();
+        let _guard = self.current_snapshot.0.lock();
         self.current_snapshot.1.notify_all();
     }
 }