瀏覽代碼

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();
     }
 }