Skip to content

Commit

Permalink
chore: Run cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelOnFira committed Apr 17, 2024
1 parent 0598dc0 commit 1a1b03b
Show file tree
Hide file tree
Showing 27 changed files with 34 additions and 34 deletions.
6 changes: 3 additions & 3 deletions lib/convert/src/convert/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn handle(
.iter()
.find(|presence| presence.user_id == user.user_id));
let user_presence = unwrap_ref!(user_presence.presence);
let status = unwrap!(backend::user::Status::from_i32(user_presence.status));
let _status = unwrap!(backend::user::Status::from_i32(user_presence.status));

Ok(models::IdentityHandle {
identity_id: user_id,
Expand All @@ -47,7 +47,7 @@ pub fn handle_without_presence(
user: &backend::user::User,
) -> GlobalResult<models::IdentityHandle> {
let user_id = unwrap_ref!(user.user_id).as_uuid();
let is_self = user_id == current_user_id;
let _is_self = user_id == current_user_id;

Ok(models::IdentityHandle {
identity_id: user_id,
Expand Down Expand Up @@ -179,7 +179,7 @@ pub fn profile(
.iter()
.find(|presence| presence.user_id == user.user_id));
let user_presence = unwrap_ref!(user_presence.presence);
let status = unwrap!(backend::user::Status::from_i32(user_presence.status));
let _status = unwrap!(backend::user::Status::from_i32(user_presence.status));

let current_user_id = Into::<common::Uuid>::into(current_user_id);
let following = pctx.mutual_follows.iter().any(|follow| {
Expand Down
2 changes: 1 addition & 1 deletion lib/convert/src/fetch/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub async fn users(
pub async fn presence_data(
ctx: &OperationContext<()>,
user_ids: Vec<common::Uuid>,
summary_info: bool,
_summary_info: bool,
) -> GlobalResult<PresencesCtx> {
let ((presences_res, game_ids),) = tokio::try_join!(presences_and_game_ids(ctx, user_ids),)?;

Expand Down
2 changes: 1 addition & 1 deletion svc/api/admin/src/route/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct ServerIpsQuery {

pub async fn server_ips(
ctx: Ctx<Auth>,
watch_index: WatchIndexQuery,
_watch_index: WatchIndexQuery,
query: ServerIpsQuery,
) -> GlobalResult<models::AdminClusterGetServerIpsResponse> {
if query.server_id.is_none() && query.pool.is_none() {
Expand Down
4 changes: 2 additions & 2 deletions svc/api/cloud/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl Auth {
let claims = self.claims()?;

if claims.as_user().is_ok() {
let (user, user_ent) = self.user(ctx).await?;
let (_user, user_ent) = self.user(ctx).await?;

assert::user_registered(ctx, user_ent.user_id).await?;

Expand Down Expand Up @@ -198,7 +198,7 @@ impl Auth {
let claims = self.claims()?;

if claims.as_user().is_ok() {
let (user, user_ent) = self.user(ctx).await?;
let (_user, user_ent) = self.user(ctx).await?;

assert::user_registered(ctx, user_ent.user_id).await?;

Expand Down
2 changes: 1 addition & 1 deletion svc/pkg/captcha/ops/hcaptcha-config-get/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use proto::backend::{self, pkg::*};
use proto::backend::{pkg::*};
use rivet_operation::prelude::*;

#[operation(name = "captcha-hcaptcha-config-get")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use chirp_worker::prelude::*;

#[worker_test]
async fn basic(ctx: TestCtx) {
async fn basic(_ctx: TestCtx) {
// TODO:
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use proto::backend::{self, pkg::*};
use proto::backend::{pkg::*};
use rivet_operation::prelude::*;

#[derive(sqlx::FromRow)]
Expand Down
4 changes: 2 additions & 2 deletions svc/pkg/cluster/ops/server-get/tests/integration.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use chirp_worker::prelude::*;
use proto::backend::pkg::*;


#[worker_test]
async fn empty(ctx: TestCtx) {
async fn empty(_ctx: TestCtx) {
// TODO:
}
4 changes: 2 additions & 2 deletions svc/pkg/cluster/ops/server-list/tests/integration.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use chirp_worker::prelude::*;
use proto::backend::pkg::*;


#[worker_test]
async fn empty(ctx: TestCtx) {
async fn empty(_ctx: TestCtx) {
// TODO:
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use chirp_worker::prelude::*;
use proto::backend::pkg::*;


#[worker_test]
async fn empty(ctx: TestCtx) {
async fn empty(_ctx: TestCtx) {
// TODO:
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub async fn gen_install(

// This script is run by systemd on startup and gets the server's data from the Rivet API
pub async fn gen_hook(server_token: &str) -> GlobalResult<String> {
let mut script = vec![components::rivet_fetch_info(server_token)?];
let script = vec![components::rivet_fetch_info(server_token)?];

let joined = script.join("\n\necho \"======\"\n\n");
Ok(format!("#!/usr/bin/env bash\nset -eu\n\n{joined}"))
Expand Down
2 changes: 1 addition & 1 deletion svc/pkg/cluster/worker/tests/server_install_complete.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use chirp_worker::prelude::*;

#[worker_test]
async fn server_install_complete(ctx: TestCtx) {
async fn server_install_complete(_ctx: TestCtx) {
// msg!([ctx] cluster::msg::server_install_complete() {

// })
Expand Down
2 changes: 1 addition & 1 deletion svc/pkg/cluster/worker/tests/server_undrain.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use chirp_worker::prelude::*;

#[worker_test]
async fn server_undrain(ctx: TestCtx) {
async fn server_undrain(_ctx: TestCtx) {
if !util::feature::server_provision() {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion svc/pkg/job-run/ops/metrics-log/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use indoc::formatdoc;
use proto::backend::pkg::*;
use reqwest::StatusCode;

use rivet_operation::prelude::*;
use serde::Deserialize;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ enum TaskState {
async fn worker(
ctx: &OperationContext<nomad::msg::monitor_alloc_update::Message>,
) -> GlobalResult<()> {
let crdb = ctx.crdb().await?;
let _crdb = ctx.crdb().await?;

let AllocationUpdated { allocation: alloc } = serde_json::from_str(&ctx.payload_json)?;
let alloc_state_json = serde_json::to_value(&alloc)?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ struct RunRow {
async fn worker(
ctx: &OperationContext<nomad::msg::monitor_eval_update::Message>,
) -> GlobalResult<()> {
let crdb = ctx.crdb().await?;
let _crdb = ctx.crdb().await?;

let payload_value = serde_json::from_str::<serde_json::Value>(&ctx.payload_json)?;
let PlanResult { evaluation: eval } = serde_json::from_str::<PlanResult>(&ctx.payload_json)?;
Expand Down
2 changes: 1 addition & 1 deletion svc/pkg/job-run/worker/tests/nomad_monitor_alloc_plan.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use chirp_worker::prelude::*;


// #[worker_test]
// async fn basic(_ctx: TestCtx) {
Expand Down
2 changes: 1 addition & 1 deletion svc/pkg/job-run/worker/tests/nomad_monitor_alloc_update.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use chirp_worker::prelude::*;


// #[worker_test]
// async fn basic(_ctx: TestCtx) {
Expand Down
2 changes: 1 addition & 1 deletion svc/pkg/job-run/worker/tests/nomad_monitor_eval_update.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use chirp_worker::prelude::*;


// #[worker_test]
// async fn basic(_ctx: TestCtx) {
Expand Down
2 changes: 1 addition & 1 deletion svc/pkg/mm-config/ops/game-upsert/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use proto::backend::{self, pkg::*};
use proto::backend::{pkg::*};
use rivet_operation::prelude::*;

#[operation(name = "mm-config-game-upsert")]
Expand Down
2 changes: 1 addition & 1 deletion svc/pkg/mm-config/ops/game-upsert/tests/integration.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use chirp_worker::prelude::*;

#[worker_test]
async fn basic(ctx: TestCtx) {
async fn basic(_ctx: TestCtx) {
// TODO:
}
2 changes: 1 addition & 1 deletion svc/pkg/mm/ops/lobby-for-run-id/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use proto::backend::{self, pkg::*};
use proto::backend::{pkg::*};
use rivet_operation::prelude::*;

#[derive(sqlx::FromRow)]
Expand Down
2 changes: 1 addition & 1 deletion svc/pkg/mm/worker/src/workers/lobby_create/nomad_job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct DecodedPort {

pub fn gen_lobby_docker_job(
runtime: &backend::matchmaker::lobby_runtime::Docker,
image_tag: &str,
_image_tag: &str,
tier: &backend::region::Tier,
lobby_config: bool,
lobby_tags: bool,
Expand Down
2 changes: 1 addition & 1 deletion svc/pkg/mm/worker/src/workers/lobby_create/oci_config.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use chirp_worker::prelude::*;
use serde_json::json;

use super::nomad_job::template_env_var;


// CPU period in microseconds.
//
Expand Down
4 changes: 2 additions & 2 deletions svc/pkg/mm/worker/tests/nomad_node_closed_set.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use chirp_worker::prelude::*;
use proto::backend::pkg::*;


#[worker_test]
async fn nomad_node_closed_set(ctx: TestCtx) {
async fn nomad_node_closed_set(_ctx: TestCtx) {
// msg!([ctx] mm::msg::nomad_node_closed_set(nomad_node_id) {

// })
Expand Down
2 changes: 1 addition & 1 deletion svc/pkg/region/ops/recommend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async fn handle(
.iter()
.map(common::Uuid::as_uuid)
.collect::<Vec<_>>();
let coords = unwrap_ref!(ctx.coords);
let _coords = unwrap_ref!(ctx.coords);

#[allow(deprecated)]
let origin = if let Some(coords) = &ctx.coords {
Expand Down
2 changes: 1 addition & 1 deletion svc/pkg/tier/ops/list/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async fn handle(ctx: OperationContext<tier::list::Request>) -> GlobalResult<tier
.find(|it| it.hardware_id == hardware),
"datacenter hardware stats not found"
);
let config = JobNodeConfig::from_linode(instance_type);
let _config = JobNodeConfig::from_linode(instance_type);

let config =
JobNodeConfig::from_linode(&linode::instance_type_get::response::InstanceType {
Expand Down

0 comments on commit 1a1b03b

Please sign in to comment.