mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-05 05:06:14 +01:00
refactor: remove unused
This commit is contained in:
@@ -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"] }
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user