Skip to content

Commit

Permalink
refactor: remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
thesimplekid committed Mar 31, 2024
1 parent deb96e7 commit 35ce004
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions crates/cashu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ k256 = { version = "0.13.1", features=["arithmetic", "serde", "schnorr"] }
lightning-invoice = { version = "0.29.0", features=["serde"] }
log = "0.4.2"
rand = "0.8.5"
getrandom = { version = "0.2", features = ["js"] }
serde = { workspace = true }
serde_json = { workspace = true }
serde_with = "3.4.0"
url = { workspace = true }
regex = "1.8.4"
itertools = "0.12.0"
thiserror = { workspace = true }
uuid = { version = "1.6.1", features = ["v4"] }
Expand Down
9 changes: 0 additions & 9 deletions crates/cashu/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ use std::time::SystemTime;
use bitcoin::hashes::sha256::Hash as Sha256;
use bitcoin::hashes::Hash;
use rand::prelude::*;
use regex::Regex;

pub fn extract_url_from_error(error: &str) -> Option<String> {
let regex = Regex::new(r"https?://[^\s]+").unwrap();
if let Some(capture) = regex.captures(error) {
return Some(capture[0].to_owned());
}
None
}

pub fn random_hash() -> Vec<u8> {
let mut rng = rand::thread_rng();
Expand Down

0 comments on commit 35ce004

Please sign in to comment.