From 24620c0a07b6f1a2b76154ce50905db837326aef Mon Sep 17 00:00:00 2001 From: Jivin Date: Sun, 20 Nov 2022 09:55:17 -0500 Subject: [PATCH] fix build issue 'error: non-binding let on a synchronization lock' --- libs/hbb_common/src/config.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/hbb_common/src/config.rs b/libs/hbb_common/src/config.rs index ea7dd6d3..c3a502ba 100644 --- a/libs/hbb_common/src/config.rs +++ b/libs/hbb_common/src/config.rs @@ -693,7 +693,7 @@ const PEERS: &str = "peers"; impl PeerConfig { pub fn load(id: &str) -> PeerConfig { - let _ = CONFIG.read().unwrap(); // for lock + let _unused = CONFIG.read().unwrap(); // for lock match confy::load_path(&Self::path(id)) { Ok(config) => config, Err(err) => { @@ -704,7 +704,7 @@ impl PeerConfig { } pub fn store(&self, id: &str) { - let _ = CONFIG.read().unwrap(); // for lock + let _unused = CONFIG.read().unwrap(); // for lock if let Err(err) = confy::store_path(Self::path(id), self) { log::error!("Failed to store config: {}", err); } @@ -845,7 +845,7 @@ pub struct LanPeers { impl LanPeers { pub fn load() -> LanPeers { - let _ = CONFIG.read().unwrap(); // for lock + let _unused = CONFIG.read().unwrap(); // for lock match confy::load_path(&Config::file_("_lan_peers")) { Ok(peers) => peers, Err(err) => {