From 4ee83e2fe5335a8afd78439c35f029c4a472e797 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 16 Dec 2024 09:00:46 +0000 Subject: 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` --- src/lib/git_events.rs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/lib/git_events.rs') diff --git a/src/lib/git_events.rs b/src/lib/git_events.rs index d8564ae..af469d3 100644 --- a/src/lib/git_events.rs +++ b/src/lib/git_events.rs @@ -1,10 +1,10 @@ use std::{str::FromStr, sync::Arc}; -use anyhow::{bail, Context, Result}; +use anyhow::{Context, Result, bail}; use nostr::nips::{nip01::Coordinate, nip10::Marker, nip19::Nip19}; use nostr_sdk::{ - hashes::sha1::Hash as Sha1Hash, Event, EventBuilder, EventId, FromBech32, Kind, NostrSigner, - PublicKey, RelayUrl, Tag, TagKind, TagStandard, + Event, EventBuilder, EventId, FromBech32, Kind, NostrSigner, PublicKey, RelayUrl, Tag, TagKind, + TagStandard, hashes::sha1::Hash as Sha1Hash, }; use crate::{ @@ -131,15 +131,14 @@ pub async fn generate_patch_event( // code that makes it into the main branch, assuming // the commit id is correct Tag::from_standardized(TagStandard::Reference(commit.to_string())), - Tag::custom( - TagKind::Custom(std::borrow::Cow::Borrowed("alt")), - vec![format!( + Tag::custom(TagKind::Custom(std::borrow::Cow::Borrowed("alt")), vec![ + format!( "git patch: {}", git_repo .get_commit_message_summary(commit) .unwrap_or_default() - )], - ), + ), + ]), ], if let Some(thread_event_id) = thread_event_id { vec![Tag::from_standardized(nostr_sdk::TagStandard::Event { @@ -203,10 +202,9 @@ pub async fn generate_patch_event( .collect(), vec![ // a fallback is now in place to extract this from the patch - Tag::custom( - TagKind::Custom(std::borrow::Cow::Borrowed("commit")), - vec![commit.to_string()], - ), + Tag::custom(TagKind::Custom(std::borrow::Cow::Borrowed("commit")), vec![ + commit.to_string(), + ]), // this is required as patches cannot be relied upon to include the 'base // commit' Tag::custom( -- cgit v1.2.3