diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-09-25 01:22:07 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-09-25 02:15:25 -0400 |
| commit | 697e90f291cec1bbd89965c2731f9481ec4507c4 (patch) | |
| tree | b40ef7142da474b0ad2bd370b2c89d2008570976 /src/login | |
| parent | af7ece7dd5433051d67526ae15ad64f0f5b5e568 (diff) | |
rustdoc comment for the (very limited) public API of the crate.
This silences some `-Wclippy::pedantic` warning, and it's just a good thing to do.
I've made the choice to have the docs comment face programmers, and to provide `hi --help` and `hi -h` content via Clap attributes instead of inferring it from the docs comment.
Internal (private) "rustdoc" comments have been converted to regular comments until I learn how to write better rustdoc.
Diffstat (limited to 'src/login')
| -rw-r--r-- | src/login/extract.rs | 20 | ||||
| -rw-r--r-- | src/login/repo/auth.rs | 6 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/login/extract.rs b/src/login/extract.rs index bda55cd..542f879 100644 --- a/src/login/extract.rs +++ b/src/login/extract.rs @@ -13,7 +13,7 @@ pub struct IdentityToken { } impl IdentityToken { - /// Creates a new, unpopulated identity token store. + // Creates a new, unpopulated identity token store. #[cfg(test)] pub fn new() -> Self { Self { @@ -21,17 +21,17 @@ impl IdentityToken { } } - /// Get the identity secret sent in the request, if any. If the identity - /// was not sent, or if it has previously been [clear]ed, then this will - /// return [None]. If the identity has previously been [set], then this - /// will return that secret, regardless of what the request originally - /// included. + // Get the identity secret sent in the request, if any. If the identity + // was not sent, or if it has previously been [clear]ed, then this will + // return [None]. If the identity has previously been [set], then this + // will return that secret, regardless of what the request originally + // included. pub fn secret(&self) -> Option<&str> { self.cookies.get(IDENTITY_COOKIE).map(Cookie::value) } - /// Positively set the identity secret, and ensure that it will be sent - /// back to the client when this extractor is included in a response. + // Positively set the identity secret, and ensure that it will be sent + // back to the client when this extractor is included in a response. pub fn set(self, secret: &str) -> Self { let identity_cookie = Cookie::build((IDENTITY_COOKIE, String::from(secret))) .http_only(true) @@ -43,8 +43,8 @@ impl IdentityToken { } } - /// Remove the identity secret and ensure that it will be cleared when this - /// extractor is included in a response. + // Remove the identity secret and ensure that it will be cleared when this + // extractor is included in a response. pub fn clear(self) -> Self { Self { cookies: self.cookies.remove(IDENTITY_COOKIE), diff --git a/src/login/repo/auth.rs b/src/login/repo/auth.rs index 78b44f0..3033c8f 100644 --- a/src/login/repo/auth.rs +++ b/src/login/repo/auth.rs @@ -18,9 +18,9 @@ impl<'c> Provider for Transaction<'c, Sqlite> { pub struct Auth<'t>(&'t mut SqliteConnection); impl<'t> Auth<'t> { - /// Retrieves a login by name, plus its stored password hash for - /// verification. If there's no login with the requested name, this will - /// return [None]. + // Retrieves a login by name, plus its stored password hash for + // verification. If there's no login with the requested name, this will + // return [None]. pub async fn for_name( &mut self, name: &str, |
