From d36014200549cf73a7f22c6f94fb15bec17823e8 Mon Sep 17 00:00:00 2001 From: Vika Date: Mon, 29 Jan 2024 07:08:21 +0300 Subject: lint: no extra whitespace on line endings --- indieauth/src/lib.rs | 2 +- indieauth/src/scopes.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indieauth') diff --git a/indieauth/src/lib.rs b/indieauth/src/lib.rs index a60cc42..9841b53 100644 --- a/indieauth/src/lib.rs +++ b/indieauth/src/lib.rs @@ -517,7 +517,7 @@ impl TokenData { /// Check if the token in question expired. pub fn expired(&self) -> bool { use std::time::{Duration, SystemTime, UNIX_EPOCH}; - + self.exp .map(|exp| SystemTime::now() .duration_since(UNIX_EPOCH) diff --git a/indieauth/src/scopes.rs b/indieauth/src/scopes.rs index d74878e..c664c55 100644 --- a/indieauth/src/scopes.rs +++ b/indieauth/src/scopes.rs @@ -164,7 +164,7 @@ impl<'de> Visitor<'de> for ScopeVisitor { } } impl<'de> Deserialize<'de> for Scopes { - + fn deserialize(deserializer: D) -> Result where D: Deserializer<'de> @@ -191,7 +191,7 @@ mod tests { let scope_str = scope_serialized.as_str().unwrap(); assert_eq!(scope_str, "create update delete media kittybox_internal_access"); - assert!(serde_json::from_value::(scope_serialized).unwrap().has_all(&scopes)) + assert!(serde_json::from_value::(scope_serialized).unwrap().has_all(&scopes)) } #[test] @@ -201,7 +201,7 @@ mod tests { ]); assert!(scopes.has_all(&[Scope::Create, Scope::custom("draft")])); - + assert!(!scopes.has_all(&[Scope::Read, Scope::custom("kittybox_internal_access")])); } -- cgit 1.4.1