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 committed Oct 13, 2023
1 parent 055da07 commit 6ff8b12
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 @@ -14,13 +14,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 @@ -10,14 +10,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 @@ -10,14 +10,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 @@ -11,9 +11,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 @@ -28,7 +28,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 6ff8b12

Please sign in to comment.