fix build issue 'error: non-binding let on a synchronization lock'

This commit is contained in:
Jivin 2022-11-20 09:55:17 -05:00
parent fa2b42db76
commit 24620c0a07

View File

@ -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) => {