Skip to content

Commit

Permalink
deps: remove reqwest
Browse files Browse the repository at this point in the history
This was preventing us from building on windows amd

Closes: #567
Signed-off-by: kernelkind <[email protected]>
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
kernelkind authored and jb55 committed Dec 13, 2024
1 parent 4bfa26f commit 13a406b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ members = [

[workspace.dependencies]
base32 = "0.4.0"
bech32 = { version = "0.11", default-features = false }
bitflags = "2.5.0"
dirs = "5.0.1"
eframe = { version = "0.29.1", default-features = false, features = [ "wgpu", "wayland", "x11", "android-native-activity" ] }
Expand All @@ -26,7 +27,7 @@ hex = "0.4.3"
image = { version = "0.25", features = ["jpeg", "png", "webp"] }
indexmap = "2.6.0"
log = "0.4.17"
nostr = { version = "0.30.0" }
nostr = { version = "0.37.0", default-features = false, features = ["std", "nip49"] }
nostrdb = { git = "https://github.com/damus-io/nostrdb-rs", rev = "71154e4100775f6932ee517da4350c433ba14ec7" }
notedeck = { path = "crates/notedeck" }
notedeck_chrome = { path = "crates/notedeck_chrome" }
Expand All @@ -35,7 +36,6 @@ open = "5.3.0"
poll-promise = { version = "0.3.0", features = ["tokio"] }
puffin = { git = "https://github.com/jb55/puffin", package = "puffin", rev = "70ff86d5503815219b01a009afd3669b7903a057" }
puffin_egui = { git = "https://github.com/jb55/puffin", package = "puffin_egui", rev = "70ff86d5503815219b01a009afd3669b7903a057" }
reqwest = { version = "0.12.4", default-features = false, features = [ "rustls-tls-native-roots" ] }
serde = { version = "1", features = ["derive"] } # You only need this if you want app persistence
serde_derive = "1"
serde_json = "1.0.89"
Expand Down
1 change: 1 addition & 0 deletions crates/enostr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ serde_derive = "1"
serde = { version = "1", features = ["derive"] } # You only need this if you want app persistence
serde_json = { workspace = true }
nostr = { workspace = true }
bech32 = { workspace = true }
nostrdb = { workspace = true }
hex = { workspace = true }
tracing = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/enostr/src/note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl fmt::Debug for NoteId {
}
}

static HRP_NOTE: nostr::bech32::Hrp = nostr::bech32::Hrp::parse_unchecked("note");
static HRP_NOTE: bech32::Hrp = bech32::Hrp::parse_unchecked("note");

impl NoteId {
pub fn new(bytes: [u8; 32]) -> Self {
Expand All @@ -34,7 +34,7 @@ impl NoteId {
}

pub fn to_bech(&self) -> Option<String> {
nostr::bech32::encode::<nostr::bech32::Bech32>(HRP_NOTE, &self.0).ok()
bech32::encode::<bech32::Bech32>(HRP_NOTE, &self.0).ok()
}
}

Expand Down
7 changes: 3 additions & 4 deletions crates/enostr/src/pubkey.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
use serde::{Deserialize, Deserializer, Serialize, Serializer};

use crate::Error;
use nostr::bech32::Hrp;
use std::fmt;
use std::ops::Deref;
use tracing::debug;

#[derive(Eq, PartialEq, Clone, Copy, Hash, Ord, PartialOrd)]
pub struct Pubkey([u8; 32]);

static HRP_NPUB: Hrp = Hrp::parse_unchecked("npub");
static HRP_NPUB: bech32::Hrp = bech32::Hrp::parse_unchecked("npub");

impl Deref for Pubkey {
type Target = [u8; 32];
Expand Down Expand Up @@ -58,7 +57,7 @@ impl Pubkey {
}

pub fn try_from_bech32_string(s: &str, verify: bool) -> Result<Self, Error> {
let data = match nostr::bech32::decode(s) {
let data = match bech32::decode(s) {
Ok(res) => Ok(res),
Err(_) => Err(Error::InvalidBech32),
}?;
Expand All @@ -79,7 +78,7 @@ impl Pubkey {
}

pub fn to_bech(&self) -> Option<String> {
nostr::bech32::encode::<nostr::bech32::Bech32>(HRP_NPUB, &self.0).ok()
bech32::encode::<bech32::Bech32>(HRP_NPUB, &self.0).ok()
}
}

Expand Down
1 change: 0 additions & 1 deletion crates/notedeck_columns/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ open = { workspace = true }
poll-promise = { workspace = true }
puffin = { workspace = true, optional = true }
puffin_egui = { workspace = true, optional = true }
reqwest = { workspace = true }
serde = { workspace = true }
serde_derive = { workspace = true }
serde_json = { workspace = true }
Expand Down

0 comments on commit 13a406b

Please sign in to comment.