From f811835ca768d6cbcef24f2873c43b51e63578ce Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 6 Dec 2023 08:14:53 +0000 Subject: build(deps) update nix - update nix flake - bump hard coded reference to rustfmt nightly version - fix warning that latest version of rustfmt produced --- flake.lock | 18 +++++++++--------- flake.nix | 2 +- src/key_handling/users.rs | 3 +-- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 29425ed..6bec3de 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1692799911, - "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "owner": "numtide", "repo": "flake-utils", - "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "type": "github" }, "original": { @@ -38,11 +38,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1694183432, - "narHash": "sha256-YyPGNapgZNNj51ylQMw9lAgvxtM2ai1HZVUu3GS8Fng=", + "lastModified": 1701436327, + "narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b", + "rev": "91050ea1e57e50388fa87a3302ba12d188ef723a", "type": "github" }, "original": { @@ -81,11 +81,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1694398298, - "narHash": "sha256-Hi904+2V5DJhFdEy9DcARSRrGJOlYSILHUC6CgTtuZU=", + "lastModified": 1701829002, + "narHash": "sha256-zUQTSNujRESm2s0SvL4EXx1l5BqX7VNDAaFWGnaylUY=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "6c520f2e31f4bebeb29cc4563543de7187013575", + "rev": "1fdfc1689218998460983986501bd65ba5bbee0f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index d527e36..26fda20 100644 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,7 @@ # ideally this wouldn't be pinned to a specific nightly version but # selectLatestNightlyWith isn't support with mixed toolchains # https://github.com/oxalica/rust-overlay/issues/136 - (lib.hiPrio rust-bin.nightly."2023-09-01".rustfmt) + (lib.hiPrio rust-bin.nightly."2023-12-01".rustfmt) # (rust-bin.stable.latest.override { extensions = [ "rust-analyzer" ]; }) rust-bin.stable.latest.default ]; diff --git a/src/key_handling/users.rs b/src/key_handling/users.rs index 75a0a00..42104f7 100644 --- a/src/key_handling/users.rs +++ b/src/key_handling/users.rs @@ -103,8 +103,7 @@ impl UserManagement for UserManager { encrypted_secret_key: Option, overwrite: bool, ) -> Result<()> { - let user_ref = - config::UserRef::new(public_key, encrypted_secret_key.unwrap_or(String::new())); + let user_ref = config::UserRef::new(public_key, encrypted_secret_key.unwrap_or_default()); let mut cfg = self.config_manager.load().context("failed to load application config to find and remove any old versions of the user's encrypted key")?; // don't overwrite unless specified -- cgit v1.2.3