refactor: remove unused

This commit is contained in:
thesimplekid
2024-03-31 17:15:33 +01:00
parent deb96e7d1a
commit 35ce004230
2 changed files with 0 additions and 11 deletions

View File

@@ -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"] }

View File

@@ -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();