From ae87aedae9696f4c855ac3dc47e61faec9d07c15 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 28 Oct 2024 15:41:14 +0000 Subject: chore: bump rust-nostr to patch near v0.36.0 bump all rust-nostr packages refactoring code based on breaking changes upgrading to patched version to address signer issue: nostr:nevent1qvzqqqqqqypzq6xcz9jerqgqkldy8lpg7lglcyj4g3nwzy2cs6u70wejdaj7csnjqy88wumn8ghj7mn0wvhxcmmv9uqzpsw5ph8le2n2kh6uchftawt74hddazk9tp7wjmz967y2l0uva5rc7hsstq --- src/lib/git/mod.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/lib/git/mod.rs') diff --git a/src/lib/git/mod.rs b/src/lib/git/mod.rs index 875a336..5d14ce3 100644 --- a/src/lib/git/mod.rs +++ b/src/lib/git/mod.rs @@ -6,7 +6,10 @@ use std::{ use anyhow::{bail, Context, Result}; use git2::{DiffOptions, Oid, Revwalk}; pub use identify_ahead_behind::identify_ahead_behind; -use nostr_sdk::hashes::{sha1::Hash as Sha1Hash, Hash}; +use nostr_sdk::{ + hashes::{sha1::Hash as Sha1Hash, Hash}, + Tags, +}; use crate::git_events::{get_commit_id_from_patch, tag_value}; pub mod identify_ahead_behind; @@ -836,10 +839,7 @@ fn git_sig_to_tag_vec(sig: &git2::Signature) -> Vec { ] } -fn extract_sig_from_patch_tags<'a>( - tags: &'a [nostr::Tag], - tag_name: &str, -) -> Result> { +fn extract_sig_from_patch_tags<'a>(tags: &'a Tags, tag_name: &str) -> Result> { let v = tags .iter() .find(|t| t.as_slice()[0].eq(tag_name)) @@ -1092,10 +1092,10 @@ mod tests { fn test(time: git2::Time) -> Result<()> { assert_eq!( extract_sig_from_patch_tags( - &[nostr::Tag::custom( + &Tags::new(vec![nostr::Tag::custom( nostr::TagKind::Custom("author".to_string().into()), prep(&time)?, - )], + )]), "author", )? .to_string(), -- cgit v1.2.3