diff --git a/src/trello/model/auth.rs b/src/trello/model/auth.rs index 1761616..8a9eab4 100644 --- a/src/trello/model/auth.rs +++ b/src/trello/model/auth.rs @@ -1,9 +1,7 @@ -use std::collections::HashMap; // use derive_more::derive::Display; use crate::newtype; -use crate::trello::TrelloConfig; newtype!(TrelloApiKey, String, Display, PartialOrd, Ord, "API Key"); newtype!( @@ -20,22 +18,3 @@ pub(crate) struct TrelloAuth<'cfg> { pub(crate) api_key: &'cfg TrelloApiKey, pub(crate) api_secret: &'cfg TrelloApiSecret, } -impl<'cfg> From<&'cfg TrelloConfig> for TrelloAuth<'cfg> { - fn from(value: &'cfg TrelloConfig) -> Self { - TrelloAuth { - api_key: &value.api_key, - api_secret: &value.api_secret, - } - } -} -impl From> for HashMap { - fn from(value: TrelloAuth) -> Self { - HashMap::from([( - "Authorization".into(), - format!( - r#"OAuth oauth_consumer_key="{}", oauth_token="{}""#, - value.api_key, value.api_secret - ), - )]) - } -}