1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-31 09:24:31 +03:00

Fix rustdoc lints

This commit is contained in:
Quentin Gliech
2023-01-18 12:25:49 +01:00
parent 142fdbd45a
commit 3798f25f7d
7 changed files with 12 additions and 12 deletions

View File

@ -56,7 +56,7 @@ impl HttpClientFactory {
Ok(layer.layer(client)) Ok(layer.layer(client))
} }
/// Constructs a new [`HttpService`], suitable for [`mas_oidc_client`] /// Constructs a new [`HttpService`], suitable for `mas-oidc-client`
/// ///
/// # Errors /// # Errors
/// ///

View File

@ -31,7 +31,7 @@ pub enum CompatSessionState {
impl CompatSessionState { impl CompatSessionState {
/// Returns `true` if the compta session state is [`Valid`]. /// Returns `true` if the compta session state is [`Valid`].
/// ///
/// [`Valid`]: ComptaSessionState::Valid /// [`Valid`]: CompatSessionState::Valid
#[must_use] #[must_use]
pub fn is_valid(&self) -> bool { pub fn is_valid(&self) -> bool {
matches!(self, Self::Valid) matches!(self, Self::Valid)
@ -39,7 +39,7 @@ impl CompatSessionState {
/// Returns `true` if the compta session state is [`Finished`]. /// Returns `true` if the compta session state is [`Finished`].
/// ///
/// [`Finished`]: ComptaSessionState::Finished /// [`Finished`]: CompatSessionState::Finished
#[must_use] #[must_use]
pub fn is_finished(&self) -> bool { pub fn is_finished(&self) -> bool {
matches!(self, Self::Finished { .. }) matches!(self, Self::Finished { .. })

View File

@ -40,7 +40,7 @@ impl AccessTokenState {
/// Returns `true` if the refresh token state is [`Valid`]. /// Returns `true` if the refresh token state is [`Valid`].
/// ///
/// [`Valid`]: RefreshTokenState::Valid /// [`Valid`]: AccessTokenState::Valid
#[must_use] #[must_use]
pub fn is_valid(&self) -> bool { pub fn is_valid(&self) -> bool {
matches!(self, Self::Valid) matches!(self, Self::Valid)
@ -48,7 +48,7 @@ impl AccessTokenState {
/// Returns `true` if the refresh token state is [`Revoked`]. /// Returns `true` if the refresh token state is [`Revoked`].
/// ///
/// [`Revoked`]: RefreshTokenState::Revoked /// [`Revoked`]: AccessTokenState::Revoked
#[must_use] #[must_use]
pub fn is_revoked(&self) -> bool { pub fn is_revoked(&self) -> bool {
matches!(self, Self::Revoked { .. }) matches!(self, Self::Revoked { .. })

View File

@ -15,12 +15,7 @@
//! A crate to store keys which can then be used to sign and verify JWTs. //! A crate to store keys which can then be used to sign and verify JWTs.
#![forbid(unsafe_code)] #![forbid(unsafe_code)]
#![deny( #![deny(clippy::all, clippy::str_to_string, rustdoc::broken_intra_doc_links)]
clippy::all,
clippy::str_to_string,
rustdoc::broken_intra_doc_links,
rustdoc::all
)]
#![warn(clippy::pedantic)] #![warn(clippy::pedantic)]
use std::{ops::Deref, sync::Arc}; use std::{ops::Deref, sync::Arc};

View File

@ -22,6 +22,9 @@
#![warn(clippy::pedantic)] #![warn(clippy::pedantic)]
#![allow(clippy::module_name_repetitions)] #![allow(clippy::module_name_repetitions)]
//! An utility crate to build flexible [`hyper`] listeners, with optional TLS
//! and proxy protocol support.
use self::{maybe_tls::TlsStreamInfo, proxy_protocol::ProxyProtocolV1Info}; use self::{maybe_tls::TlsStreamInfo, proxy_protocol::ProxyProtocolV1Info};
pub mod maybe_tls; pub mod maybe_tls;

View File

@ -39,7 +39,7 @@ pub struct Server<S> {
impl<S> Server<S> { impl<S> Server<S> {
/// # Errors /// # Errors
/// ///
/// Returns an error if the listener couldn't be converted via [`TryInfo`] /// Returns an error if the listener couldn't be converted via [`TryInto`]
pub fn try_new<L>(listener: L, service: S) -> Result<Self, L::Error> pub fn try_new<L>(listener: L, service: S) -> Result<Self, L::Error>
where where
L: TryInto<UnixOrTcpListener>, L: TryInto<UnixOrTcpListener>,

View File

@ -21,6 +21,8 @@
)] )]
#![warn(clippy::pedantic)] #![warn(clippy::pedantic)]
//! A crate to help serve single-page apps built by Vite.
mod vite; mod vite;
use std::{future::Future, pin::Pin}; use std::{future::Future, pin::Pin};