diff options
Diffstat (limited to 'src/repo')
| -rw-r--r-- | src/repo/channel.rs | 3 | ||||
| -rw-r--r-- | src/repo/login/store.rs | 2 | ||||
| -rw-r--r-- | src/repo/message.rs | 2 | ||||
| -rw-r--r-- | src/repo/token.rs | 16 |
4 files changed, 11 insertions, 12 deletions
diff --git a/src/repo/channel.rs b/src/repo/channel.rs index da63b45..0186413 100644 --- a/src/repo/channel.rs +++ b/src/repo/channel.rs @@ -23,7 +23,6 @@ pub struct Channel { } impl<'c> Channels<'c> { - /// Create a new channel. pub async fn create(&mut self, name: &str) -> Result<Channel, sqlx::Error> { let id = Id::generate(); @@ -78,7 +77,7 @@ impl<'c> Channels<'c> { } } -/// Stable identifier for a [Channel]. Prefixed with `C`. +// Stable identifier for a [Channel]. Prefixed with `C`. #[derive( Clone, Debug, diff --git a/src/repo/login/store.rs b/src/repo/login/store.rs index 2f922d7..b485941 100644 --- a/src/repo/login/store.rs +++ b/src/repo/login/store.rs @@ -62,7 +62,7 @@ impl<'t> From<&'t mut SqliteConnection> for Logins<'t> { } } -/// Stable identifier for a [Login]. Prefixed with `L`. +// Stable identifier for a [Login]. Prefixed with `L`. #[derive(Clone, Debug, Eq, PartialEq, sqlx::Type, serde::Serialize)] #[sqlx(transparent)] pub struct Id(BaseId); diff --git a/src/repo/message.rs b/src/repo/message.rs index e331a4e..385b103 100644 --- a/src/repo/message.rs +++ b/src/repo/message.rs @@ -2,7 +2,7 @@ use std::fmt; use crate::id::Id as BaseId; -/// Stable identifier for a [Message]. Prefixed with `M`. +// Stable identifier for a [Message]. Prefixed with `M`. #[derive(Clone, Debug, Eq, Hash, PartialEq, sqlx::Type, serde::Deserialize, serde::Serialize)] #[sqlx(transparent)] #[serde(transparent)] diff --git a/src/repo/token.rs b/src/repo/token.rs index 4eaa6ea..8276bea 100644 --- a/src/repo/token.rs +++ b/src/repo/token.rs @@ -17,8 +17,8 @@ impl<'c> Provider for Transaction<'c, Sqlite> { pub struct Tokens<'t>(&'t mut SqliteConnection); impl<'c> Tokens<'c> { - /// Issue a new token for an existing login. The issued_at timestamp will - /// be used to control expiry, until the token is actually used. + // Issue a new token for an existing login. The issued_at timestamp will + // be used to control expiry, until the token is actually used. pub async fn issue( &mut self, login: &Login, @@ -43,7 +43,7 @@ impl<'c> Tokens<'c> { Ok(secret) } - /// Revoke a token by its secret. + // Revoke a token by its secret. pub async fn revoke(&mut self, secret: &str) -> Result<(), sqlx::Error> { sqlx::query!( r#" @@ -60,8 +60,8 @@ impl<'c> Tokens<'c> { Ok(()) } - /// Expire and delete all tokens that haven't been used more recently than - /// ``expire_at``. + // Expire and delete all tokens that haven't been used more recently than + // `expire_at`. pub async fn expire(&mut self, expire_at: &DateTime) -> Result<(), sqlx::Error> { sqlx::query!( r#" @@ -77,9 +77,9 @@ impl<'c> Tokens<'c> { Ok(()) } - /// Validate a token by its secret, retrieving the associated Login record. - /// Will return [None] if the token is not valid. The token's last-used - /// timestamp will be set to `used_at`. + // Validate a token by its secret, retrieving the associated Login record. + // Will return [None] if the token is not valid. The token's last-used + // timestamp will be set to `used_at`. pub async fn validate( &mut self, secret: &str, |
