Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
fix: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
taco-paco committed Oct 14, 2024
1 parent 4643f6c commit 005f36e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/src/handlers/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use std::process::Stdio;
use tracing::instrument;
use tracing::{error, info};

pub(crate) const COMPILATION_LABEL_VALUE: &'static str = "compilation";
pub(crate) const COMPILATION_LABEL_VALUE: &str = "compilation";

#[instrument]
#[post("/compile", format = "json", data = "<request_json>")]
Expand Down
4 changes: 2 additions & 2 deletions api/src/handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub async fn dispatch_command(
Err(e) => Err(e),
},
ApiCommand::Compile(request) => {
let res = match do_compile(request, &metrics).await {
let res = match do_compile(request, metrics).await {
Ok(compile_response) => {
Ok(ApiCommandResult::Compile(compile_response.into_inner()))
}
Expand All @@ -81,7 +81,7 @@ pub async fn dispatch_command(
res
}
ApiCommand::Verify(request) => {
let res = match do_verify(request, &metrics).await {
let res = match do_verify(request, metrics).await {
Ok(verify_response) => Ok(ApiCommandResult::Verify(verify_response.into_inner())),
Err(e) => {
metrics
Expand Down
2 changes: 1 addition & 1 deletion api/src/handlers/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::utils::lib::{
};
use crate::worker::WorkerEngine;

pub(crate) const VERIFICATION_LABEL_VALUE: &'static str = "compilation";
pub(crate) const VERIFICATION_LABEL_VALUE: &str = "compilation";

#[instrument]
#[post("/verify", format = "json", data = "<verification_request_json>")]
Expand Down
2 changes: 1 addition & 1 deletion api/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl Metrics {
}

pub(crate) fn create_metrics(registry: Registry) -> Result<Metrics, CoreError> {
const ACTION_LABEL_NAME: &'static str = "action";
const ACTION_LABEL_NAME: &str = "action";

let opts = Opts::new("num_distinct_users", "Number of distinct users").namespace(NAMESPACE);
let num_distinct_users = IntCounterVec::new(opts, &["ip"])?;
Expand Down

0 comments on commit 005f36e

Please sign in to comment.