From c6120cc6793a0151a024cbe6b49729890acdae9b Mon Sep 17 00:00:00 2001 From: DanGould Date: Tue, 26 Nov 2024 21:40:02 -0500 Subject: [PATCH] Remove unused Headers type --- src/receive/mod.rs | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/receive/mod.rs b/src/receive/mod.rs index ff16c86..ef367c4 100644 --- a/src/receive/mod.rs +++ b/src/receive/mod.rs @@ -1,4 +1,3 @@ -use std::collections::HashMap; use std::io::Cursor; use std::str::FromStr; use std::time::Duration; @@ -16,30 +15,6 @@ use crate::{ClientResponse, Request, Url}; #[cfg(feature = "uniffi")] pub mod uni; -#[derive(Clone)] -#[cfg_attr(feature = "uniffi", derive(uniffi::Object))] -pub struct Headers(pub HashMap); - -#[cfg_attr(feature = "uniffi", uniffi::export)] -impl Headers { - #[cfg_attr(feature = "uniffi", uniffi::constructor)] - pub fn from_vec(body: Vec) -> Self { - let mut h = HashMap::new(); - h.insert("content-type".to_string(), "text/plain".to_string()); - h.insert("content-length".to_string(), body.len().to_string()); - Headers(h) - } - pub fn get_map(&self) -> HashMap { - self.0.clone() - } -} - -impl payjoin::receive::Headers for Headers { - fn get_header(&self, key: &str) -> Option<&str> { - self.0.get(key).map(|e| e.as_str()) - } -} - #[derive(Clone, Debug)] pub struct Receiver(pub payjoin::receive::v2::Receiver); impl From for payjoin::receive::v2::Receiver {