Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ jobs:

- name: Install toolchain
run: |
rustup toolchain install 1.82.0
rustup default 1.82.0
rustup toolchain install 1.83.0
rustup default 1.83.0
rustup component add clippy

- name: Setup OPA
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
# The Debian version and version name must be in sync
ARG DEBIAN_VERSION=12
ARG DEBIAN_VERSION_NAME=bookworm
ARG RUSTC_VERSION=1.82.0
ARG RUSTC_VERSION=1.83.0
ARG NODEJS_VERSION=20.15.0
ARG OPA_VERSION=0.64.1
ARG CARGO_AUDITABLE_VERSION=0.6.4
ARG CARGO_CHEF_VERSION=0.1.67
ARG CARGO_AUDITABLE_VERSION=0.6.6
ARG CARGO_CHEF_VERSION=0.1.68

##########################################
## Build stage that builds the frontend ##
Expand Down
16 changes: 8 additions & 8 deletions crates/i18n-scan/src/minijinja.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn find_in_stmt<'a>(context: &mut Context, stmt: &'a Stmt<'a>) -> Result<(),
Stmt::EmitRaw(_raw) => {}
Stmt::ForLoop(for_loop) => {
find_in_expr(context, &for_loop.iter)?;
find_in_optional_expr(context, &for_loop.filter_expr)?;
find_in_optional_expr(context, for_loop.filter_expr.as_ref())?;
find_in_expr(context, &for_loop.target)?;
find_in_stmts(context, &for_loop.body)?;
find_in_stmts(context, &for_loop.else_body)?;
Expand Down Expand Up @@ -66,7 +66,7 @@ pub fn find_in_stmt<'a>(context: &mut Context, stmt: &'a Stmt<'a>) -> Result<(),
find_in_expr(context, &from_import.expr)?;
for (name, alias) in &from_import.names {
find_in_expr(context, name)?;
find_in_optional_expr(context, alias)?;
find_in_optional_expr(context, alias.as_ref())?;
}
}
Stmt::Extends(extends) => {
Expand Down Expand Up @@ -185,9 +185,9 @@ fn find_in_expr<'a>(context: &mut Context, expr: &'a Expr<'a>) -> Result<(), min
Expr::Const(_const) => {}
Expr::Slice(slice) => {
find_in_expr(context, &slice.expr)?;
find_in_optional_expr(context, &slice.start)?;
find_in_optional_expr(context, &slice.stop)?;
find_in_optional_expr(context, &slice.step)?;
find_in_optional_expr(context, slice.start.as_ref())?;
find_in_optional_expr(context, slice.stop.as_ref())?;
find_in_optional_expr(context, slice.step.as_ref())?;
}
Expr::UnaryOp(unary_op) => {
find_in_expr(context, &unary_op.expr)?;
Expand All @@ -199,10 +199,10 @@ fn find_in_expr<'a>(context: &mut Context, expr: &'a Expr<'a>) -> Result<(), min
Expr::IfExpr(if_expr) => {
find_in_expr(context, &if_expr.test_expr)?;
find_in_expr(context, &if_expr.true_expr)?;
find_in_optional_expr(context, &if_expr.false_expr)?;
find_in_optional_expr(context, if_expr.false_expr.as_ref())?;
}
Expr::Filter(filter) => {
find_in_optional_expr(context, &filter.expr)?;
find_in_optional_expr(context, filter.expr.as_ref())?;
find_in_call_args(context, &filter.args)?;
}
Expr::Test(test) => {
Expand Down Expand Up @@ -241,7 +241,7 @@ fn find_in_exprs<'a>(context: &mut Context, exprs: &'a [Expr<'a>]) -> Result<(),

fn find_in_optional_expr<'a>(
context: &mut Context,
expr: &'a Option<Expr<'a>>,
expr: Option<&'a Expr<'a>>,
) -> Result<(), minijinja::Error> {
if let Some(expr) = expr {
find_in_expr(context, expr)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/i18n/src/sprintf/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ pub enum FormattedMessagePart<'a> {
Placeholder(String),
}

impl<'a> FormattedMessagePart<'a> {
impl FormattedMessagePart<'_> {
fn len(&self) -> usize {
match self {
FormattedMessagePart::Text(text) => text.len(),
Expand Down
6 changes: 3 additions & 3 deletions crates/jose/src/claims.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ impl<'a> TokenHash<'a> {
}
}

impl<'a> Validator<String> for TokenHash<'a> {
impl Validator<String> for TokenHash<'_> {
type Error = TokenHashError;
fn validate(&self, value: &String) -> Result<(), Self::Error> {
if hash_token(self.alg, self.token)? == *value {
Expand Down Expand Up @@ -362,7 +362,7 @@ impl<'a, T: ?Sized> Equality<'a, T> {
}
}

impl<'a, T1, T2> Validator<T1> for Equality<'a, T2>
impl<T1, T2> Validator<T1> for Equality<'_, T2>
where
T2: PartialEq<T1> + ?Sized,
{
Expand Down Expand Up @@ -399,7 +399,7 @@ impl<'a, T> Contains<'a, T> {
#[error("OneOrMany doesn't contain value")]
pub struct ContainsError;

impl<'a, T> Validator<OneOrMany<T>> for Contains<'a, T>
impl<T> Validator<OneOrMany<T>> for Contains<'_, T>
where
T: PartialEq,
{
Expand Down
2 changes: 1 addition & 1 deletion crates/jose/src/constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub trait Constrainable {
fn kty(&self) -> JsonWebKeyType;
}

impl<'a> Constraint<'a> {
impl Constraint<'_> {
fn decide<T: Constrainable>(&self, constrainable: &T) -> ConstraintDecision {
match self {
Constraint::Alg { constraint_alg } => {
Expand Down
4 changes: 2 additions & 2 deletions crates/jose/src/jwt/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl RawJwt<'static> {
}
}

impl<'a> std::fmt::Display for RawJwt<'a> {
impl std::fmt::Display for RawJwt<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.inner)
}
Expand Down Expand Up @@ -57,7 +57,7 @@ impl<'a> RawJwt<'a> {
}
}

impl<'a> Deref for RawJwt<'a> {
impl Deref for RawJwt<'_> {
type Target = str;

fn deref(&self) -> &Self::Target {
Expand Down
4 changes: 2 additions & 2 deletions crates/jose/src/jwt/signed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ pub struct Jwt<'a, T> {
signature: Vec<u8>,
}

impl<'a, T> std::fmt::Display for Jwt<'a, T> {
impl<T> std::fmt::Display for Jwt<'_, T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.raw)
}
}

impl<'a, T> std::fmt::Debug for Jwt<'a, T>
impl<T> std::fmt::Debug for Jwt<'_, T>
where
T: std::fmt::Debug,
{
Expand Down
8 changes: 3 additions & 5 deletions crates/keystore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,9 @@ impl PrivateKey {
pkcs8::EncryptedPrivateKeyInfo::PEM_LABEL => {
let info = pkcs8::EncryptedPrivateKeyInfo::from_der(&doc)?;
let decrypted = info.decrypt(password)?;
return Self::load_der(decrypted.as_bytes()).map_err(|inner| {
LoadError::InEncrypted {
inner: Box::new(inner),
}
});
Self::load_der(decrypted.as_bytes()).map_err(|inner| LoadError::InEncrypted {
inner: Box::new(inner),
})
}

pkcs1::RsaPrivateKey::PEM_LABEL
Expand Down
2 changes: 1 addition & 1 deletion crates/spa/src/vite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ impl Manifest {
&'a self,
current_entry: &'a ManifestEntry,
entries: &mut BTreeSet<Asset<'a>>,
) -> Result<Asset, InvalidManifest<'a>> {
) -> Result<Asset<'a>, InvalidManifest<'a>> {
let asset = Asset::new(current_entry)?;
let inserted = entries.insert(asset);

Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/app_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ fn split_filter(
}

#[async_trait]
impl<'c> AppSessionRepository for PgAppSessionRepository<'c> {
impl AppSessionRepository for PgAppSessionRepository<'_> {
type Error = DatabaseError;

#[allow(clippy::too_many_lines)]
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/compat/access_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl From<CompatAccessTokenLookup> for CompatAccessToken {
}

#[async_trait]
impl<'c> CompatAccessTokenRepository for PgCompatAccessTokenRepository<'c> {
impl CompatAccessTokenRepository for PgCompatAccessTokenRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/compat/refresh_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl From<CompatRefreshTokenLookup> for CompatRefreshToken {
}

#[async_trait]
impl<'c> CompatRefreshTokenRepository for PgCompatRefreshTokenRepository<'c> {
impl CompatRefreshTokenRepository for PgCompatRefreshTokenRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/compat/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ impl Filter for CompatSessionFilter<'_> {
}

#[async_trait]
impl<'c> CompatSessionRepository for PgCompatSessionRepository<'c> {
impl CompatSessionRepository for PgCompatSessionRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/compat/sso_login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ impl Filter for CompatSsoLoginFilter<'_> {
}

#[async_trait]
impl<'c> CompatSsoLoginRepository for PgCompatSsoLoginRepository<'c> {
impl CompatSsoLoginRepository for PgCompatSsoLoginRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl<'c> PgJobRepository<'c> {
}

#[async_trait]
impl<'c> JobRepository for PgJobRepository<'c> {
impl JobRepository for PgJobRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/oauth2/access_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl From<OAuth2AccessTokenLookup> for AccessToken {
}

#[async_trait]
impl<'c> OAuth2AccessTokenRepository for PgOAuth2AccessTokenRepository<'c> {
impl OAuth2AccessTokenRepository for PgOAuth2AccessTokenRepository<'_> {
type Error = DatabaseError;

async fn lookup(&mut self, id: Ulid) -> Result<Option<AccessToken>, Self::Error> {
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/oauth2/authorization_grant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl TryFrom<GrantLookup> for AuthorizationGrant {
}

#[async_trait]
impl<'c> OAuth2AuthorizationGrantRepository for PgOAuth2AuthorizationGrantRepository<'c> {
impl OAuth2AuthorizationGrantRepository for PgOAuth2AuthorizationGrantRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/oauth2/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ impl TryInto<Client> for OAuth2ClientLookup {
}

#[async_trait]
impl<'c> OAuth2ClientRepository for PgOAuth2ClientRepository<'c> {
impl OAuth2ClientRepository for PgOAuth2ClientRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/oauth2/device_code_grant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl TryFrom<OAuth2DeviceGrantLookup> for DeviceCodeGrant {
}

#[async_trait]
impl<'c> OAuth2DeviceCodeGrantRepository for PgOAuth2DeviceCodeGrantRepository<'c> {
impl OAuth2DeviceCodeGrantRepository for PgOAuth2DeviceCodeGrantRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/oauth2/refresh_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl From<OAuth2RefreshTokenLookup> for RefreshToken {
}

#[async_trait]
impl<'c> OAuth2RefreshTokenRepository for PgOAuth2RefreshTokenRepository<'c> {
impl OAuth2RefreshTokenRepository for PgOAuth2RefreshTokenRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/oauth2/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ impl Filter for OAuth2SessionFilter<'_> {
}

#[async_trait]
impl<'c> OAuth2SessionRepository for PgOAuth2SessionRepository<'c> {
impl OAuth2SessionRepository for PgOAuth2SessionRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/upstream_oauth2/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl Filter for UpstreamOAuthLinkFilter<'_> {
}

#[async_trait]
impl<'c> UpstreamOAuthLinkRepository for PgUpstreamOAuthLinkRepository<'c> {
impl UpstreamOAuthLinkRepository for PgUpstreamOAuthLinkRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/upstream_oauth2/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ impl Filter for UpstreamOAuthProviderFilter<'_> {
}

#[async_trait]
impl<'c> UpstreamOAuthProviderRepository for PgUpstreamOAuthProviderRepository<'c> {
impl UpstreamOAuthProviderRepository for PgUpstreamOAuthProviderRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/upstream_oauth2/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl TryFrom<SessionLookup> for UpstreamOAuthAuthorizationSession {
}

#[async_trait]
impl<'c> UpstreamOAuthSessionRepository for PgUpstreamOAuthSessionRepository<'c> {
impl UpstreamOAuthSessionRepository for PgUpstreamOAuthSessionRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/user/email.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl Filter for UserEmailFilter<'_> {
}

#[async_trait]
impl<'c> UserEmailRepository for PgUserEmailRepository<'c> {
impl UserEmailRepository for PgUserEmailRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/user/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl Filter for UserFilter<'_> {
}

#[async_trait]
impl<'c> UserRepository for PgUserRepository<'c> {
impl UserRepository for PgUserRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/user/password.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct UserPasswordLookup {
}

#[async_trait]
impl<'c> UserPasswordRepository for PgUserPasswordRepository<'c> {
impl UserPasswordRepository for PgUserPasswordRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/user/recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl From<UserRecoveryTicketRow> for UserRecoveryTicket {
}

#[async_trait]
impl<'c> UserRecoveryRepository for PgUserRecoveryRepository<'c> {
impl UserRecoveryRepository for PgUserRecoveryRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/user/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl crate::filter::Filter for BrowserSessionFilter<'_> {
}

#[async_trait]
impl<'c> BrowserSessionRepository for PgBrowserSessionRepository<'c> {
impl BrowserSessionRepository for PgBrowserSessionRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage-pg/src/user/terms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl<'c> PgUserTermsRepository<'c> {
}

#[async_trait]
impl<'c> UserTermsRepository for PgUserTermsRepository<'c> {
impl UserTermsRepository for PgUserTermsRepository<'_> {
type Error = DatabaseError;

#[tracing::instrument(
Expand Down
2 changes: 1 addition & 1 deletion crates/storage/src/upstream_oauth2/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub struct UpstreamOAuthProviderFilter<'a> {
_lifetime: PhantomData<&'a ()>,
}

impl<'a> UpstreamOAuthProviderFilter<'a> {
impl UpstreamOAuthProviderFilter<'_> {
/// Create a new [`UpstreamOAuthProviderFilter`] with default values
#[must_use]
pub fn new() -> Self {
Expand Down
2 changes: 1 addition & 1 deletion crates/storage/src/user/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub struct UserFilter<'a> {
_phantom: std::marker::PhantomData<&'a ()>,
}

impl<'a> UserFilter<'a> {
impl UserFilter<'_> {
/// Create a new [`UserFilter`] with default values
#[must_use]
pub fn new() -> Self {
Expand Down
Loading
Loading