upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock12
-rw-r--r--flake.nix2
-rw-r--r--test_utils/src/git.rs2
-rw-r--r--test_utils/src/lib.rs22
-rw-r--r--test_utils/src/relay.rs2
-rw-r--r--tests/ngit_login.rs2
-rw-r--r--tests/ngit_send.rs2
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 @@
20 }, 20 },
21 "nixpkgs": { 21 "nixpkgs": {
22 "locked": { 22 "locked": {
23 "lastModified": 1752480373, 23 "lastModified": 1760524057,
24 "narHash": "sha256-JHQbm+OcGp32wAsXTE/FLYGNpb+4GLi5oTvCxwSoBOA=", 24 "narHash": "sha256-EVAqOteLBFmd7pKkb0+FIUyzTF61VKi7YmvP1tw4nEw=",
25 "owner": "NixOS", 25 "owner": "NixOS",
26 "repo": "nixpkgs", 26 "repo": "nixpkgs",
27 "rev": "62e0f05ede1da0d54515d4ea8ce9c733f12d9f08", 27 "rev": "544961dfcce86422ba200ed9a0b00dd4b1486ec5",
28 "type": "github" 28 "type": "github"
29 }, 29 },
30 "original": { 30 "original": {
@@ -62,11 +62,11 @@
62 "nixpkgs": "nixpkgs_2" 62 "nixpkgs": "nixpkgs_2"
63 }, 63 },
64 "locked": { 64 "locked": {
65 "lastModified": 1752633862, 65 "lastModified": 1760668505,
66 "narHash": "sha256-Bj7ozT1+5P7NmvDcuAXJvj56txcXuAhk3Vd9FdWFQzk=", 66 "narHash": "sha256-Ed0cGwPZtLRiSvMx4KgPx8bhLYzn5jiJ7s5o5vj4oG0=",
67 "owner": "oxalica", 67 "owner": "oxalica",
68 "repo": "rust-overlay", 68 "repo": "rust-overlay",
69 "rev": "8668ca94858206ac3db0860a9dec471de0d995f8", 69 "rev": "18234d2c11b10eaec9ccc3a1089a5ea872ec8858",
70 "type": "github" 70 "type": "github"
71 }, 71 },
72 "original": { 72 "original": {
diff --git a/flake.nix b/flake.nix
index 9ca8a7d..94eec8b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -19,7 +19,7 @@
19 # ideally this wouldn't be pinned to a specific nightly version but 19 # ideally this wouldn't be pinned to a specific nightly version but
20 # selectLatestNightlyWith isn't support with mixed toolchains 20 # selectLatestNightlyWith isn't support with mixed toolchains
21 # https://github.com/oxalica/rust-overlay/issues/136 21 # https://github.com/oxalica/rust-overlay/issues/136
22 (lib.hiPrio rust-bin.nightly."2025-07-16".rustfmt) 22 (lib.hiPrio rust-bin.nightly."2025-10-16".rustfmt)
23 # (rust-bin.stable.latest.override { extensions = [ "rust-analyzer" ]; }) 23 # (rust-bin.stable.latest.override { extensions = [ "rust-analyzer" ]; })
24 rust-bin.stable.latest.default 24 rust-bin.stable.latest.default
25 ]; 25 ];
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 {
216 Ok(oid) 216 Ok(oid)
217 } 217 }
218 218
219 pub fn create_branch(&self, branch_name: &str) -> Result<Branch> { 219 pub fn create_branch(&'_ self, branch_name: &str) -> Result<Branch<'_>> {
220 self.git_repo 220 self.git_repo
221 .branch(branch_name, &self.git_repo.head()?.peel_to_commit()?, false) 221 .branch(branch_name, &self.git_repo.head()?.peel_to_commit()?, false)
222 .context("could not create branch") 222 .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 {
225} 225}
226 226
227impl CliTester { 227impl CliTester {
228 pub fn expect_input(&mut self, prompt: &str) -> Result<CliTesterInputPrompt> { 228 pub fn expect_input(&'_ mut self, prompt: &str) -> Result<CliTesterInputPrompt<'_>> {
229 let mut i = CliTesterInputPrompt { 229 let mut i = CliTesterInputPrompt {
230 tester: self, 230 tester: self,
231 prompt: prompt.to_string(), 231 prompt: prompt.to_string(),
@@ -234,7 +234,7 @@ impl CliTester {
234 Ok(i) 234 Ok(i)
235 } 235 }
236 236
237 pub fn expect_input_eventually(&mut self, prompt: &str) -> Result<CliTesterInputPrompt> { 237 pub fn expect_input_eventually(&'_ mut self, prompt: &str) -> Result<CliTesterInputPrompt<'_>> {
238 let mut i = CliTesterInputPrompt { 238 let mut i = CliTesterInputPrompt {
239 tester: self, 239 tester: self,
240 prompt: prompt.to_string(), 240 prompt: prompt.to_string(),
@@ -243,7 +243,7 @@ impl CliTester {
243 Ok(i) 243 Ok(i)
244 } 244 }
245 245
246 pub fn expect_password(&mut self, prompt: &str) -> Result<CliTesterPasswordPrompt> { 246 pub fn expect_password(&'_ mut self, prompt: &str) -> Result<CliTesterPasswordPrompt<'_>> {
247 let mut i = CliTesterPasswordPrompt { 247 let mut i = CliTesterPasswordPrompt {
248 tester: self, 248 tester: self,
249 prompt: prompt.to_string(), 249 prompt: prompt.to_string(),
@@ -254,10 +254,10 @@ impl CliTester {
254 } 254 }
255 255
256 pub fn expect_confirm( 256 pub fn expect_confirm(
257 &mut self, 257 &'_ mut self,
258 prompt: &str, 258 prompt: &str,
259 default: Option<bool>, 259 default: Option<bool>,
260 ) -> Result<CliTesterConfirmPrompt> { 260 ) -> Result<CliTesterConfirmPrompt<'_>> {
261 let mut i = CliTesterConfirmPrompt { 261 let mut i = CliTesterConfirmPrompt {
262 tester: self, 262 tester: self,
263 prompt: prompt.to_string(), 263 prompt: prompt.to_string(),
@@ -268,10 +268,10 @@ impl CliTester {
268 } 268 }
269 269
270 pub fn expect_confirm_eventually( 270 pub fn expect_confirm_eventually(
271 &mut self, 271 &'_ mut self,
272 prompt: &str, 272 prompt: &str,
273 default: Option<bool>, 273 default: Option<bool>,
274 ) -> Result<CliTesterConfirmPrompt> { 274 ) -> Result<CliTesterConfirmPrompt<'_>> {
275 let mut i = CliTesterConfirmPrompt { 275 let mut i = CliTesterConfirmPrompt {
276 tester: self, 276 tester: self,
277 prompt: prompt.to_string(), 277 prompt: prompt.to_string(),
@@ -282,10 +282,10 @@ impl CliTester {
282 } 282 }
283 283
284 pub fn expect_choice( 284 pub fn expect_choice(
285 &mut self, 285 &'_ mut self,
286 prompt: &str, 286 prompt: &str,
287 choices: Vec<String>, 287 choices: Vec<String>,
288 ) -> Result<CliTesterChoicePrompt> { 288 ) -> Result<CliTesterChoicePrompt<'_>> {
289 let mut i = CliTesterChoicePrompt { 289 let mut i = CliTesterChoicePrompt {
290 tester: self, 290 tester: self,
291 prompt: prompt.to_string(), 291 prompt: prompt.to_string(),
@@ -296,10 +296,10 @@ impl CliTester {
296 } 296 }
297 297
298 pub fn expect_multi_select( 298 pub fn expect_multi_select(
299 &mut self, 299 &'_ mut self,
300 prompt: &str, 300 prompt: &str,
301 choices: Vec<String>, 301 choices: Vec<String>,
302 ) -> Result<CliTesterMultiSelectPrompt> { 302 ) -> Result<CliTesterMultiSelectPrompt<'_>> {
303 let mut i = CliTesterMultiSelectPrompt { 303 let mut i = CliTesterMultiSelectPrompt {
304 tester: self, 304 tester: self,
305 prompt: prompt.to_string(), 305 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> {
168 self.respond_standard_req( 168 self.respond_standard_req(
169 client_id, 169 client_id,
170 &subscription_id, 170 &subscription_id,
171 &[filter.clone()], 171 std::slice::from_ref(&filter),
172 )?; 172 )?;
173 // self.respond_eose(client_id, subscription_id)?; 173 // self.respond_eose(client_id, subscription_id)?;
174 } 174 }
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::*;
5 5
6static EXPECTED_NSEC_PROMPT: &str = "nsec"; 6static EXPECTED_NSEC_PROMPT: &str = "nsec";
7 7
8fn show_first_time_login_choices(p: &mut CliTester) -> Result<CliTesterChoicePrompt> { 8fn show_first_time_login_choices(p: &'_ mut CliTester) -> Result<CliTesterChoicePrompt<'_>> {
9 p.expect_choice( 9 p.expect_choice(
10 "login to nostr", 10 "login to nostr",
11 vec![ 11 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 {
56 )) 56 ))
57 } 57 }
58 58
59 fn expect_confirm_prompt(p: &mut CliTester) -> Result<CliTesterConfirmPrompt> { 59 fn expect_confirm_prompt(p: &'_ mut CliTester) -> Result<CliTesterConfirmPrompt<'_>> {
60 p.expect("fetching updates...\r\n")?; 60 p.expect("fetching updates...\r\n")?;
61 p.expect_eventually("\r\n")?; // may be 'no updates' or some updates 61 p.expect_eventually("\r\n")?; // may be 'no updates' or some updates
62 p.expect("creating proposal from 2 commits:\r\n")?; 62 p.expect("creating proposal from 2 commits:\r\n")?;