Fixed some annoying warnings

This commit is contained in:
techmetx11 2024-07-03 18:13:34 +01:00
parent 053e89cd79
commit e1dbc56a32
No known key found for this signature in database
GPG Key ID: E60B63635FF4E062
2 changed files with 13 additions and 17 deletions

View File

@ -1,14 +1,10 @@
use futures::{Sink, SinkExt, Stream, StreamExt}; use futures::SinkExt;
use rquickjs::{async_with, AsyncContext, AsyncRuntime}; use rquickjs::{async_with, AsyncContext, AsyncRuntime};
use std::{num::NonZeroUsize, sync::Arc, thread::available_parallelism}; use std::{num::NonZeroUsize, sync::Arc, thread::available_parallelism};
use tokio::{io::AsyncWriteExt, runtime::Handle, sync::Mutex, task::block_in_place}; use tokio::{runtime::Handle, sync::Mutex, task::block_in_place};
use tub::Pool; use tub::Pool;
use crate::{ use crate::{consts::NSIG_FUNCTION_NAME, opcode::OpcodeResponse, player::fetch_update};
consts::NSIG_FUNCTION_NAME,
opcode::OpcodeResponse,
player::{fetch_update, FetchUpdateStatus},
};
pub enum JobOpcode { pub enum JobOpcode {
ForceUpdate, ForceUpdate,
@ -128,7 +124,7 @@ pub async fn process_fetch_update<W>(
let status = fetch_update(global_state).await; let status = fetch_update(global_state).await;
let mut writer = cloned_writer.lock().await; let mut writer = cloned_writer.lock().await;
writer let _ = writer
.send(OpcodeResponse { .send(OpcodeResponse {
opcode: JobOpcode::ForceUpdate, opcode: JobOpcode::ForceUpdate,
request_id, request_id,
@ -172,7 +168,7 @@ pub async fn process_decrypt_n_signature<W>(
} }
println!("Code: {}", player_info.nsig_function_code.clone()); println!("Code: {}", player_info.nsig_function_code.clone());
writer = cloned_writer.lock().await; writer = cloned_writer.lock().await;
writer.send(OpcodeResponse { let _ = writer.send(OpcodeResponse {
opcode: JobOpcode::DecryptNSignature, opcode: JobOpcode::DecryptNSignature,
request_id, request_id,
update_status: Ok(Default::default()), update_status: Ok(Default::default()),
@ -204,7 +200,7 @@ pub async fn process_decrypt_n_signature<W>(
} }
println!("Code: {}", call_string.clone()); println!("Code: {}", call_string.clone());
writer = cloned_writer.lock().await; writer = cloned_writer.lock().await;
writer.send(OpcodeResponse { let _ = writer.send(OpcodeResponse {
opcode: JobOpcode::DecryptNSignature, opcode: JobOpcode::DecryptNSignature,
request_id, request_id,
update_status: Ok(Default::default()), update_status: Ok(Default::default()),
@ -219,7 +215,7 @@ pub async fn process_decrypt_n_signature<W>(
writer = cloned_writer.lock().await; writer = cloned_writer.lock().await;
writer.send(OpcodeResponse { let _ = writer.send(OpcodeResponse {
opcode: JobOpcode::DecryptNSignature, opcode: JobOpcode::DecryptNSignature,
request_id, request_id,
update_status: Ok(Default::default()), update_status: Ok(Default::default()),
@ -262,7 +258,7 @@ pub async fn process_decrypt_signature<W>(
} }
println!("Code: {}", player_info.sig_function_code.clone()); println!("Code: {}", player_info.sig_function_code.clone());
writer = cloned_writer.lock().await; writer = cloned_writer.lock().await;
writer.send(OpcodeResponse { let _ = writer.send(OpcodeResponse {
opcode: JobOpcode::DecryptSignature, opcode: JobOpcode::DecryptSignature,
request_id, request_id,
update_status: Ok(Default::default()), update_status: Ok(Default::default()),
@ -297,7 +293,7 @@ pub async fn process_decrypt_signature<W>(
} }
println!("Code: {}", call_string.clone()); println!("Code: {}", call_string.clone());
writer = cloned_writer.lock().await; writer = cloned_writer.lock().await;
writer.send(OpcodeResponse { let _ = writer.send(OpcodeResponse {
opcode: JobOpcode::DecryptSignature, opcode: JobOpcode::DecryptSignature,
request_id, request_id,
update_status: Ok(Default::default()), update_status: Ok(Default::default()),
@ -312,7 +308,7 @@ pub async fn process_decrypt_signature<W>(
writer = cloned_writer.lock().await; writer = cloned_writer.lock().await;
writer.send(OpcodeResponse { let _ = writer.send(OpcodeResponse {
opcode: JobOpcode::DecryptSignature, opcode: JobOpcode::DecryptSignature,
request_id, request_id,
update_status: Ok(Default::default()), update_status: Ok(Default::default()),
@ -339,7 +335,7 @@ pub async fn process_get_signature_timestamp<W>(
let timestamp = player_info.signature_timestamp; let timestamp = player_info.signature_timestamp;
let mut writer = cloned_writer.lock().await; let mut writer = cloned_writer.lock().await;
writer let _ = writer
.send(OpcodeResponse { .send(OpcodeResponse {
opcode: JobOpcode::GetSignatureTimestamp, opcode: JobOpcode::GetSignatureTimestamp,
request_id, request_id,
@ -368,7 +364,7 @@ pub async fn process_player_status<W>(
let mut writer = cloned_writer.lock().await; let mut writer = cloned_writer.lock().await;
writer let _ = writer
.send(OpcodeResponse { .send(OpcodeResponse {
opcode: JobOpcode::PlayerStatus, opcode: JobOpcode::PlayerStatus,
request_id, request_id,

View File

@ -1,4 +1,4 @@
use std::{fmt::Debug, sync::Arc}; use std::sync::Arc;
use regex::Regex; use regex::Regex;