From 4a9dcc66ac7be69031a19f6ece0be4642e1f3057 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 17 Oct 2025 15:22:05 +0100 Subject: chore: nix flake update update nix dependancies including hardcoded nightly.rustfmt applied autofixes --- flake.lock | 12 ++++++------ flake.nix | 2 +- test_utils/src/git.rs | 2 +- test_utils/src/lib.rs | 22 +++++++++++----------- test_utils/src/relay.rs | 2 +- tests/ngit_login.rs | 2 +- tests/ngit_send.rs | 2 +- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/flake.lock b/flake.lock index 6b8a5ab..10f7546 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1752480373, - "narHash": "sha256-JHQbm+OcGp32wAsXTE/FLYGNpb+4GLi5oTvCxwSoBOA=", + "lastModified": 1760524057, + "narHash": "sha256-EVAqOteLBFmd7pKkb0+FIUyzTF61VKi7YmvP1tw4nEw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "62e0f05ede1da0d54515d4ea8ce9c733f12d9f08", + "rev": "544961dfcce86422ba200ed9a0b00dd4b1486ec5", "type": "github" }, "original": { @@ -62,11 +62,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1752633862, - "narHash": "sha256-Bj7ozT1+5P7NmvDcuAXJvj56txcXuAhk3Vd9FdWFQzk=", + "lastModified": 1760668505, + "narHash": "sha256-Ed0cGwPZtLRiSvMx4KgPx8bhLYzn5jiJ7s5o5vj4oG0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "8668ca94858206ac3db0860a9dec471de0d995f8", + "rev": "18234d2c11b10eaec9ccc3a1089a5ea872ec8858", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 9ca8a7d..94eec8b 100644 --- a/flake.nix +++ b/flake.nix @@ -19,7 +19,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."2025-07-16".rustfmt) + (lib.hiPrio rust-bin.nightly."2025-10-16".rustfmt) # (rust-bin.stable.latest.override { extensions = [ "rust-analyzer" ]; }) rust-bin.stable.latest.default ]; diff --git a/test_utils/src/git.rs b/test_utils/src/git.rs index 5942a54..ab21f38 100644 --- a/test_utils/src/git.rs +++ b/test_utils/src/git.rs @@ -216,7 +216,7 @@ impl GitTestRepo { Ok(oid) } - pub fn create_branch(&self, branch_name: &str) -> Result { + pub fn create_branch(&'_ self, branch_name: &str) -> Result> { self.git_repo .branch(branch_name, &self.git_repo.head()?.peel_to_commit()?, false) .context("could not create branch") diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs index 8d81efe..22bdf90 100644 --- a/test_utils/src/lib.rs +++ b/test_utils/src/lib.rs @@ -225,7 +225,7 @@ pub struct CliTester { } impl CliTester { - pub fn expect_input(&mut self, prompt: &str) -> Result { + pub fn expect_input(&'_ mut self, prompt: &str) -> Result> { let mut i = CliTesterInputPrompt { tester: self, prompt: prompt.to_string(), @@ -234,7 +234,7 @@ impl CliTester { Ok(i) } - pub fn expect_input_eventually(&mut self, prompt: &str) -> Result { + pub fn expect_input_eventually(&'_ mut self, prompt: &str) -> Result> { let mut i = CliTesterInputPrompt { tester: self, prompt: prompt.to_string(), @@ -243,7 +243,7 @@ impl CliTester { Ok(i) } - pub fn expect_password(&mut self, prompt: &str) -> Result { + pub fn expect_password(&'_ mut self, prompt: &str) -> Result> { let mut i = CliTesterPasswordPrompt { tester: self, prompt: prompt.to_string(), @@ -254,10 +254,10 @@ impl CliTester { } pub fn expect_confirm( - &mut self, + &'_ mut self, prompt: &str, default: Option, - ) -> Result { + ) -> Result> { let mut i = CliTesterConfirmPrompt { tester: self, prompt: prompt.to_string(), @@ -268,10 +268,10 @@ impl CliTester { } pub fn expect_confirm_eventually( - &mut self, + &'_ mut self, prompt: &str, default: Option, - ) -> Result { + ) -> Result> { let mut i = CliTesterConfirmPrompt { tester: self, prompt: prompt.to_string(), @@ -282,10 +282,10 @@ impl CliTester { } pub fn expect_choice( - &mut self, + &'_ mut self, prompt: &str, choices: Vec, - ) -> Result { + ) -> Result> { let mut i = CliTesterChoicePrompt { tester: self, prompt: prompt.to_string(), @@ -296,10 +296,10 @@ impl CliTester { } pub fn expect_multi_select( - &mut self, + &'_ mut self, prompt: &str, choices: Vec, - ) -> Result { + ) -> Result> { let mut i = CliTesterMultiSelectPrompt { tester: self, prompt: prompt.to_string(), diff --git a/test_utils/src/relay.rs b/test_utils/src/relay.rs index 8a982a4..313e824 100644 --- a/test_utils/src/relay.rs +++ b/test_utils/src/relay.rs @@ -168,7 +168,7 @@ impl<'a> Relay<'a> { self.respond_standard_req( client_id, &subscription_id, - &[filter.clone()], + std::slice::from_ref(&filter), )?; // self.respond_eose(client_id, subscription_id)?; } diff --git a/tests/ngit_login.rs b/tests/ngit_login.rs index 9e708dc..31c6edf 100644 --- a/tests/ngit_login.rs +++ b/tests/ngit_login.rs @@ -5,7 +5,7 @@ use test_utils::*; static EXPECTED_NSEC_PROMPT: &str = "nsec"; -fn show_first_time_login_choices(p: &mut CliTester) -> Result { +fn show_first_time_login_choices(p: &'_ mut CliTester) -> Result> { p.expect_choice( "login to nostr", vec![ diff --git a/tests/ngit_send.rs b/tests/ngit_send.rs index a5bb564..2ae858a 100644 --- a/tests/ngit_send.rs +++ b/tests/ngit_send.rs @@ -56,7 +56,7 @@ mod when_commits_behind_ask_to_proceed { )) } - fn expect_confirm_prompt(p: &mut CliTester) -> Result { + fn expect_confirm_prompt(p: &'_ mut CliTester) -> Result> { p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // may be 'no updates' or some updates p.expect("creating proposal from 2 commits:\r\n")?; -- cgit v1.2.3