diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-09-25 14:37:17 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-09-25 14:37:17 +0100 |
| commit | d6faad17e814d252a72e3aca39a4b3898382bab9 (patch) | |
| tree | 16a238703293fe0d9cce04fa83de2af4a88f5433 /src/bin/ngit/sub_commands/list.rs | |
| parent | 4f84dc460c3494286233afe9ca480d3b7c0186b1 (diff) | |
chore: bump rust-nostr v0.35
bump all rust-nostr packages
Diffstat (limited to 'src/bin/ngit/sub_commands/list.rs')
| -rw-r--r-- | src/bin/ngit/sub_commands/list.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bin/ngit/sub_commands/list.rs b/src/bin/ngit/sub_commands/list.rs index 0755e3b..351896a 100644 --- a/src/bin/ngit/sub_commands/list.rs +++ b/src/bin/ngit/sub_commands/list.rs | |||
| @@ -52,7 +52,7 @@ pub async fn launch() -> Result<()> { | |||
| 52 | vec![ | 52 | vec![ |
| 53 | nostr::Filter::default() | 53 | nostr::Filter::default() |
| 54 | .kinds(status_kinds().clone()) | 54 | .kinds(status_kinds().clone()) |
| 55 | .events(proposals_and_revisions.iter().map(nostr::Event::id)), | 55 | .events(proposals_and_revisions.iter().map(|e| e.id)), |
| 56 | ], | 56 | ], |
| 57 | ) | 57 | ) |
| 58 | .await?; | 58 | .await?; |
| @@ -76,15 +76,15 @@ pub async fn launch() -> Result<()> { | |||
| 76 | let status = if let Some(e) = statuses | 76 | let status = if let Some(e) = statuses |
| 77 | .iter() | 77 | .iter() |
| 78 | .filter(|e| { | 78 | .filter(|e| { |
| 79 | status_kinds().contains(&e.kind()) | 79 | status_kinds().contains(&e.kind) |
| 80 | && e.tags() | 80 | && e.tags |
| 81 | .iter() | 81 | .iter() |
| 82 | .any(|t| t.as_vec()[1].eq(&proposal.id.to_string())) | 82 | .any(|t| t.as_slice()[1].eq(&proposal.id.to_string())) |
| 83 | }) | 83 | }) |
| 84 | .collect::<Vec<&nostr::Event>>() | 84 | .collect::<Vec<&nostr::Event>>() |
| 85 | .first() | 85 | .first() |
| 86 | { | 86 | { |
| 87 | e.kind() | 87 | e.kind |
| 88 | } else { | 88 | } else { |
| 89 | Kind::GitStatusOpen | 89 | Kind::GitStatusOpen |
| 90 | }; | 90 | }; |
| @@ -184,7 +184,7 @@ pub async fn launch() -> Result<()> { | |||
| 184 | let commits_events: Vec<nostr::Event> = get_all_proposal_patch_events_from_cache( | 184 | let commits_events: Vec<nostr::Event> = get_all_proposal_patch_events_from_cache( |
| 185 | git_repo_path, | 185 | git_repo_path, |
| 186 | &repo_ref, | 186 | &repo_ref, |
| 187 | &proposals_for_status[selected_index].id(), | 187 | &proposals_for_status[selected_index].id, |
| 188 | ) | 188 | ) |
| 189 | .await?; | 189 | .await?; |
| 190 | 190 | ||
| @@ -704,7 +704,7 @@ fn save_patches_to_dir(mut patches: Vec<nostr::Event>, git_repo: &Repo) -> Resul | |||
| 704 | .truncate(true) | 704 | .truncate(true) |
| 705 | .open(path) | 705 | .open(path) |
| 706 | .context("open new patch file with write and truncate options")?; | 706 | .context("open new patch file with write and truncate options")?; |
| 707 | file.write_all(patch.content().as_bytes())?; | 707 | file.write_all(patch.content.as_bytes())?; |
| 708 | file.write_all("\n\n".as_bytes())?; | 708 | file.write_all("\n\n".as_bytes())?; |
| 709 | file.flush()?; | 709 | file.flush()?; |
| 710 | } | 710 | } |