aboutsummaryrefslogtreecommitdiffstats
path: root/src/db.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-12-14 23:00:15 -0500
committerJesse Luehrs <doy@tozt.net>2021-12-15 12:45:54 -0500
commitacd1173848b4db1c733af7d3f53d24aab900b542 (patch)
treeb0a1151e390c6063169325bc4520d7b79ac50d9e /src/db.rs
parentcc20037ff21a259419c7c00f6fce82ded3888d1e (diff)
downloadrbw-acd1173848b4db1c733af7d3f53d24aab900b542.tar.gz
rbw-acd1173848b4db1c733af7d3f53d24aab900b542.zip
clippy
Diffstat (limited to 'src/db.rs')
-rw-r--r--src/db.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/db.rs b/src/db.rs
index 5359321..cc9319e 100644
--- a/src/db.rs
+++ b/src/db.rs
@@ -106,6 +106,7 @@ impl<'de> serde::Deserialize<'de> for Uri {
#[derive(
serde::Serialize, serde::Deserialize, Debug, Clone, Eq, PartialEq,
)]
+#[allow(clippy::large_enum_variant)]
pub enum EntryData {
Login {
username: Option<String>,
@@ -173,6 +174,7 @@ pub struct Db {
}
impl Db {
+ #[must_use]
pub fn new() -> Self {
Self::default()
}
@@ -287,6 +289,7 @@ impl Db {
Ok(())
}
+ #[must_use]
pub fn needs_login(&self) -> bool {
self.access_token.is_none()
|| self.refresh_token.is_none()