diff options
Diffstat (limited to 'indieauth')
-rw-r--r-- | indieauth/src/pkce.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indieauth/src/pkce.rs b/indieauth/src/pkce.rs index 852ce0a..8dcf9b1 100644 --- a/indieauth/src/pkce.rs +++ b/indieauth/src/pkce.rs @@ -28,6 +28,11 @@ impl PKCEMethod { #[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] pub struct PKCEVerifier(pub(super) String); +impl<T: Into<String>> From<T> for PKCEVerifier { + fn from(t: T) -> Self { + Self(t.into()) + } +} impl AsRef<str> for PKCEVerifier { fn as_ref(&self) -> &str { self.0.as_str() |