deps: Remove bitcoin_hashes and use nostr::hashes re-export
Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://gnu.org/licenses/gpl-3.0.html>.
|
||||
|
||||
use bitcoin_hashes::Sha1;
|
||||
use clap::Args;
|
||||
use nostr::hashes::sha1::Hash as Sha1Hash;
|
||||
|
||||
use super::PatchStatus;
|
||||
use crate::{
|
||||
@@ -40,7 +40,7 @@ pub struct ApplyArgs {
|
||||
patch_id: NostrEvent,
|
||||
/// The applied commits
|
||||
#[arg(num_args = 1..)]
|
||||
applied_commits: Vec<Sha1>,
|
||||
applied_commits: Vec<Sha1Hash>,
|
||||
}
|
||||
|
||||
impl CommandRunner for ApplyArgs {
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://gnu.org/licenses/gpl-3.0.html>.
|
||||
|
||||
use bitcoin_hashes::Sha1;
|
||||
use clap::Args;
|
||||
use nostr::hashes::sha1::Hash as Sha1Hash;
|
||||
|
||||
use super::PatchStatus;
|
||||
use crate::{
|
||||
@@ -39,7 +39,7 @@ pub struct MergeArgs {
|
||||
/// revision root
|
||||
patch_id: NostrEvent,
|
||||
/// The merge commit id
|
||||
merge_commit: Sha1,
|
||||
merge_commit: Sha1Hash,
|
||||
}
|
||||
|
||||
impl CommandRunner for MergeArgs {
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
use std::{fs, str::FromStr};
|
||||
|
||||
use bitcoin_hashes::Sha1;
|
||||
use clap::Args;
|
||||
use futures::future;
|
||||
use nostr::{
|
||||
event::{EventBuilder, EventId, Kind, Tag, TagKind, Tags, UnsignedEvent},
|
||||
hashes::sha1::Hash as Sha1Hash,
|
||||
key::PublicKey,
|
||||
nips::{nip01::Coordinate, nip10::Marker},
|
||||
types::RelayUrl,
|
||||
@@ -156,7 +156,7 @@ async fn make_patch_series(
|
||||
original_patch: Option<EventId>,
|
||||
relay_hint: Option<RelayUrl>,
|
||||
repo_coordinates: Vec<Coordinate>,
|
||||
euc: &Sha1,
|
||||
euc: Option<&Sha1Hash>,
|
||||
author_pkey: PublicKey,
|
||||
) -> N34Result<(Vec<UnsignedEvent>, Vec<RelayUrl>)> {
|
||||
let mut write_relays = Vec::new();
|
||||
@@ -207,7 +207,7 @@ async fn make_patch(
|
||||
reply_to: Option<EventId>,
|
||||
write_relay: Option<&RelayUrl>,
|
||||
repo_coordinates: &[Coordinate],
|
||||
euc: &Sha1,
|
||||
euc: Option<&Sha1Hash>,
|
||||
author_pkey: PublicKey,
|
||||
) -> (UnsignedEvent, Vec<RelayUrl>) {
|
||||
let content_details = client.parse_content(&patch.body).await;
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
use std::iter;
|
||||
|
||||
use bitcoin_hashes::Sha1;
|
||||
use either::Either;
|
||||
use nostr::{
|
||||
event::{EventBuilder, Tag, TagKind},
|
||||
filter::Filter,
|
||||
hashes::sha1::Hash as Sha1Hash,
|
||||
nips::nip10::Marker,
|
||||
};
|
||||
|
||||
@@ -128,7 +128,7 @@ pub async fn patch_status_command(
|
||||
patch_id: NostrEvent,
|
||||
naddrs: Option<Vec<NaddrOrSet>>,
|
||||
new_status: PatchStatus,
|
||||
merge_or_applied_commits: Option<Either<Sha1, Vec<Sha1>>>,
|
||||
merge_or_applied_commits: Option<Either<Sha1Hash, Vec<Sha1Hash>>>,
|
||||
check_fn: impl FnOnce(&PatchStatus) -> N34Result<()>,
|
||||
) -> N34Result<()> {
|
||||
let user_pkey = options.pubkey().await?;
|
||||
|
||||
Reference in New Issue
Block a user