Skip to content

Commit

Permalink
fix: address clippy errors
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Zak <[email protected]>
  • Loading branch information
rjzak authored and npmccallum committed Feb 21, 2024
1 parent f081436 commit 2f9fd14
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions crates/server/src/tags/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ use mime::APPLICATION_JSON;
use tracing::{debug, trace};

pub async fn query(
Extension(ref store): Extension<Arc<Store>>,
ref cx: RepositoryContext,
Extension(store): Extension<Arc<Store>>,
cx: RepositoryContext,
req: Request<Body>,
) -> impl IntoResponse {
trace!(target: "app::tags::query", "called for `{cx}`");

assert_repository_read(store, cx, req)
assert_repository_read(&store, &cx, req)
.await
.map_err(IntoResponse::into_response)
.map(|(repo, _)| repo)?
Expand Down
6 changes: 3 additions & 3 deletions crates/server/src/users/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ use axum::Extension;
use tracing::{debug, trace};

pub async fn get(
Extension(ref store): Extension<Arc<Store>>,
Extension(store): Extension<Arc<Store>>,
claims: OidcClaims,
ref cx: UserContext,
cx: UserContext,
) -> impl IntoResponse {
trace!(target: "app::users::get", "called for `{cx}`");

let user = claims
.assert_user(store, cx, ScopeContext::User, ScopeLevel::Read)
.assert_user(&store, &cx, ScopeContext::User, ScopeLevel::Read)
.await
.map_err(IntoResponse::into_response)?;

Expand Down
6 changes: 3 additions & 3 deletions crates/server/src/users/head.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ use axum::Extension;
use tracing::{debug, trace};

pub async fn head(
Extension(ref store): Extension<Arc<Store>>,
Extension(store): Extension<Arc<Store>>,
claims: OidcClaims,
ref cx: UserContext,
cx: UserContext,
) -> impl IntoResponse {
trace!(target: "app::users::head", "called for `{cx}`");

claims
.assert_user(store, cx, ScopeContext::User, ScopeLevel::Read)
.assert_user(&store, &cx, ScopeContext::User, ScopeLevel::Read)
.await
.map_err(IntoResponse::into_response)?
.get_meta()
Expand Down
6 changes: 3 additions & 3 deletions crates/server/src/users/put.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use axum::{Extension, Json};
use tracing::{debug, trace};

pub async fn put(
Extension(ref store): Extension<Arc<Store>>,
Extension(store): Extension<Arc<Store>>,
claims: OidcClaims,
ref cx: UserContext,
cx: UserContext,
meta: Meta,
Json(ref record): Json<UserRecord>,
) -> impl IntoResponse {
Expand All @@ -29,7 +29,7 @@ pub async fn put(
}

store
.create_user(cx, meta, record)
.create_user(&cx, meta, record)
.await
.map_err(|e| {
debug!(target: "app::users::put", "failed for `{cx}`: {:?}", e);
Expand Down

0 comments on commit 2f9fd14

Please sign in to comment.