Преглед на файлове

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

Jing Yang преди 4 години
родител
ревизия
4c4c7f00df
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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();
     }
 }