diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-12-16 09:00:46 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-12-16 09:46:30 +0000 |
| commit | 4ee83e2fe5335a8afd78439c35f029c4a472e797 (patch) | |
| tree | bdb111b191e7a68cb74ce29b4bb2757b4b7be91f /src/bin/ngit/sub_commands/send.rs | |
| parent | 5fe839e2bf8ceb2931c1984efb2d956980431203 (diff) | |
chore: bump nix flake rust nightly `fmt` overlay
update the rust nightly `fmt` overlay which needs to be pinned
to a specific version (this case by date)
update formatting in main files via `cargo fmt`
Diffstat (limited to 'src/bin/ngit/sub_commands/send.rs')
| -rw-r--r-- | src/bin/ngit/sub_commands/send.rs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/bin/ngit/sub_commands/send.rs b/src/bin/ngit/sub_commands/send.rs index c6c75c9..7c898bc 100644 --- a/src/bin/ngit/sub_commands/send.rs +++ b/src/bin/ngit/sub_commands/send.rs | |||
| @@ -1,23 +1,23 @@ | |||
| 1 | use std::path::Path; | 1 | use std::path::Path; |
| 2 | 2 | ||
| 3 | use anyhow::{bail, Context, Result}; | 3 | use anyhow::{Context, Result, bail}; |
| 4 | use console::Style; | 4 | use console::Style; |
| 5 | use ngit::{client::send_events, git_events::generate_cover_letter_and_patch_events}; | 5 | use ngit::{client::send_events, git_events::generate_cover_letter_and_patch_events}; |
| 6 | use nostr::{ | 6 | use nostr::{ |
| 7 | nips::{nip10::Marker, nip19::Nip19Event}, | ||
| 8 | ToBech32, | 7 | ToBech32, |
| 8 | nips::{nip10::Marker, nip19::Nip19Event}, | ||
| 9 | }; | 9 | }; |
| 10 | use nostr_sdk::hashes::sha1::Hash as Sha1Hash; | 10 | use nostr_sdk::hashes::sha1::Hash as Sha1Hash; |
| 11 | 11 | ||
| 12 | use crate::{ | 12 | use crate::{ |
| 13 | cli::{extract_signer_cli_arguments, Cli}, | 13 | cli::{Cli, extract_signer_cli_arguments}, |
| 14 | cli_interactor::{ | 14 | cli_interactor::{ |
| 15 | Interactor, InteractorPrompt, PromptConfirmParms, PromptInputParms, PromptMultiChoiceParms, | 15 | Interactor, InteractorPrompt, PromptConfirmParms, PromptInputParms, PromptMultiChoiceParms, |
| 16 | }, | 16 | }, |
| 17 | client::{ | 17 | client::{ |
| 18 | fetching_with_report, get_events_from_local_cache, get_repo_ref_from_cache, Client, Connect, | 18 | Client, Connect, fetching_with_report, get_events_from_local_cache, get_repo_ref_from_cache, |
| 19 | }, | 19 | }, |
| 20 | git::{identify_ahead_behind, Repo, RepoActions}, | 20 | git::{Repo, RepoActions, identify_ahead_behind}, |
| 21 | git_events::{event_is_patch_set_root, event_tag_from_nip19_or_hex}, | 21 | git_events::{event_is_patch_set_root, event_tag_from_nip19_or_hex}, |
| 22 | login, | 22 | login, |
| 23 | repo_ref::get_repo_coordinates_when_remote_unknown, | 23 | repo_ref::get_repo_coordinates_when_remote_unknown, |
| @@ -369,10 +369,9 @@ async fn get_root_proposal_id_and_mentions_from_in_reply_to( | |||
| 369 | public_key: _, | 369 | public_key: _, |
| 370 | uppercase: false, | 370 | uppercase: false, |
| 371 | }) => { | 371 | }) => { |
| 372 | let events = get_events_from_local_cache( | 372 | let events = get_events_from_local_cache(git_repo_path, vec![ |
| 373 | git_repo_path, | 373 | nostr::Filter::new().id(*event_id), |
| 374 | vec![nostr::Filter::new().id(*event_id)], | 374 | ]) |
| 375 | ) | ||
| 376 | .await?; | 375 | .await?; |
| 377 | 376 | ||
| 378 | if let Some(first) = events.iter().find(|e| e.id.eq(event_id)) { | 377 | if let Some(first) = events.iter().find(|e| e.id.eq(event_id)) { |