Skip to content

Commit

Permalink
Merge pull request #149 from JivinDotL/master
Browse files Browse the repository at this point in the history
fix build issue 'error: non-binding let on a synchronization lock'
  • Loading branch information
rustdesk authored Nov 20, 2022
2 parents fa2b42d + 24620c0 commit 011b316
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/hbb_common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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);
}
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 011b316

Please sign in to comment.