diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2023-01-01 20:47:59 -0500 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2023-01-01 20:50:11 -0500 |
commit | 33dfcd18252dd8a4845cd58b93bd177ab0dffde9 (patch) | |
tree | fbb6fc049677a492cd9d5196d6b1709f0b32b873 /server/src/auth.rs | |
parent | d3fbefad9cf25786fb5f28f96eeceb65d0a8b35b (diff) |
Fix clippy warnings
Diffstat (limited to 'server/src/auth.rs')
-rw-r--r-- | server/src/auth.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/src/auth.rs b/server/src/auth.rs index 76b16cf..173a2b3 100644 --- a/server/src/auth.rs +++ b/server/src/auth.rs @@ -96,6 +96,12 @@ impl SessionId { } } +impl Default for SessionId { + fn default() -> Self { + Self::new() + } +} + impl ToString for SessionId { fn to_string(&self) -> String { self.0.to_string() @@ -116,7 +122,7 @@ fn token_safe_time() -> chrono::Duration { chrono::Duration::seconds(30) } -pub const LOGIN_CALLBACK: &'static str = "/api/login_callback"; +pub const LOGIN_CALLBACK: &str = "/api/login_callback"; fn redirect_url(app_url: &str) -> RedirectUrl { RedirectUrl::new(format!("{}{}", app_url, LOGIN_CALLBACK)).unwrap() } |