Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

rustdesk: fix for rust 1.65

authored by

Theodore Ni and committed by
Bjørn Forsman
f6c0dcfb 4b79d6c3

+36
+5
pkgs/applications/networking/remote/rustdesk/default.nix
··· 38 38 sha256 = "sha256-IlrfqwNyaSHE9Ct0mn7MUxEg7p1Ku34eOMYelEAYFW8="; 39 39 }; 40 40 41 + patches = [ 42 + # based on https://github.com/rustdesk/rustdesk/pull/1900 43 + ./fix-for-rust-1.65.diff 44 + ]; 45 + 41 46 cargoSha256 = "sha256-1OMWEk+DerltF7kwdo4d04rbgIFLHBRq3vZaL7jtrdE="; 42 47 43 48 LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib";
+31
pkgs/applications/networking/remote/rustdesk/fix-for-rust-1.65.diff
··· 1 + diff --git a/libs/hbb_common/src/config.rs b/libs/hbb_common/src/config.rs 2 + index 74982de5..308bcf80 100644 3 + --- a/libs/hbb_common/src/config.rs 4 + +++ b/libs/hbb_common/src/config.rs 5 + @@ -656,7 +656,7 @@ const PEERS: &str = "peers"; 6 + 7 + impl PeerConfig { 8 + pub fn load(id: &str) -> PeerConfig { 9 + - let _ = CONFIG.read().unwrap(); // for lock 10 + + let _lock = CONFIG.read().unwrap(); 11 + match confy::load_path(&Self::path(id)) { 12 + Ok(config) => config, 13 + Err(err) => { 14 + @@ -667,7 +667,7 @@ impl PeerConfig { 15 + } 16 + 17 + pub fn store(&self, id: &str) { 18 + - let _ = CONFIG.read().unwrap(); // for lock 19 + + let _lock = CONFIG.read().unwrap(); 20 + if let Err(err) = confy::store_path(Self::path(id), self) { 21 + log::error!("Failed to store config: {}", err); 22 + } 23 + @@ -808,7 +808,7 @@ pub struct LanPeers { 24 + 25 + impl LanPeers { 26 + pub fn load() -> LanPeers { 27 + - let _ = CONFIG.read().unwrap(); // for lock 28 + + let _lock = CONFIG.read().unwrap(); 29 + match confy::load_path(&Config::file_("_lan_peers")) { 30 + Ok(peers) => peers, 31 + Err(err) => {