From 35ce00423083eed44a86f2bca44c2efc909f2245 Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Sun, 31 Mar 2024 17:15:33 +0100 Subject: [PATCH] refactor: remove unused --- crates/cashu/Cargo.toml | 2 -- crates/cashu/src/utils.rs | 9 --------- 2 files changed, 11 deletions(-) diff --git a/crates/cashu/Cargo.toml b/crates/cashu/Cargo.toml index f34d08f89..9cd673158 100644 --- a/crates/cashu/Cargo.toml +++ b/crates/cashu/Cargo.toml @@ -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"] } diff --git a/crates/cashu/src/utils.rs b/crates/cashu/src/utils.rs index 2d9132bf6..a7738479b 100644 --- a/crates/cashu/src/utils.rs +++ b/crates/cashu/src/utils.rs @@ -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 { - 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 { let mut rng = rand::thread_rng();