mirror of
https://github.com/lennart-k/rustical.git
synced 2026-01-31 19:48:18 +00:00
Lots of clippy appeasement
This commit is contained in:
@@ -53,9 +53,9 @@ impl<S: Clone, AP: AuthenticationProvider> Clone for AuthenticationMiddleware<S,
|
||||
}
|
||||
}
|
||||
|
||||
impl<S: Clone, AP: AuthenticationProvider> Service<Request> for AuthenticationMiddleware<S, AP>
|
||||
impl<S, AP: AuthenticationProvider> Service<Request> for AuthenticationMiddleware<S, AP>
|
||||
where
|
||||
S: Service<Request, Response = Response> + Send + 'static,
|
||||
S: Service<Request, Response = Response> + Send + Clone + 'static,
|
||||
S::Future: Send + 'static,
|
||||
{
|
||||
type Response = S::Response;
|
||||
|
||||
@@ -35,7 +35,8 @@ impl Principal {
|
||||
/// Returns true if the user is either
|
||||
/// - the principal itself
|
||||
/// - has full access to the prinicpal (is member)
|
||||
#[must_use] pub fn is_principal(&self, principal: &str) -> bool {
|
||||
#[must_use]
|
||||
pub fn is_principal(&self, principal: &str) -> bool {
|
||||
if self.id == principal {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,8 @@ impl TryFrom<&str> for PrincipalType {
|
||||
}
|
||||
|
||||
impl PrincipalType {
|
||||
#[must_use] pub const fn as_str(&self) -> &'static str {
|
||||
#[must_use]
|
||||
pub const fn as_str(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Individual => "INDIVIDUAL",
|
||||
Self::Group => "GROUP",
|
||||
|
||||
Reference in New Issue
Block a user