nixpkgs/pkgs/applications/networking/remote/rustdesk/fix-for-rust-1.65.diff
2022-12-10 16:56:48 +01:00

32 lines
1.1 KiB
Diff

diff --git a/libs/hbb_common/src/config.rs b/libs/hbb_common/src/config.rs
index 74982de5..308bcf80 100644
--- a/libs/hbb_common/src/config.rs
+++ b/libs/hbb_common/src/config.rs
@@ -656,7 +656,7 @@ const PEERS: &str = "peers";
impl PeerConfig {
pub fn load(id: &str) -> PeerConfig {
- let _ = CONFIG.read().unwrap(); // for lock
+ let _lock = CONFIG.read().unwrap();
match confy::load_path(&Self::path(id)) {
Ok(config) => config,
Err(err) => {
@@ -667,7 +667,7 @@ impl PeerConfig {
}
pub fn store(&self, id: &str) {
- let _ = CONFIG.read().unwrap(); // for lock
+ let _lock = CONFIG.read().unwrap();
if let Err(err) = confy::store_path(Self::path(id), self) {
log::error!("Failed to store config: {}", err);
}
@@ -808,7 +808,7 @@ pub struct LanPeers {
impl LanPeers {
pub fn load() -> LanPeers {
- let _ = CONFIG.read().unwrap(); // for lock
+ let _lock = CONFIG.read().unwrap();
match confy::load_path(&Config::file_("_lan_peers")) {
Ok(peers) => peers,
Err(err) => {