fix(warnings): add an underscore to unused variables
This commit is contained in:
parent
f74cfd3ff3
commit
d9cee5ddb4
9 changed files with 9 additions and 9 deletions
|
|
@ -129,7 +129,7 @@ async fn start_auth_server() -> AuthServer{
|
|||
async move {
|
||||
|
||||
|
||||
let encryption_pairs = Vec::from_iter((0..=count).map(|v| {
|
||||
let encryption_pairs = Vec::from_iter((0..=count).map(|_v| {
|
||||
let rc4: Rc4<U5> = Rc4::new_from_slice( "CD&ML".as_bytes()).unwrap();
|
||||
let cypher = Box::new(rc4);
|
||||
let server_cypher: Box<dyn StreamCipher + Send> = cypher;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ pub async fn login(rmcmessage: &RMCMessage, _name: &str) -> RMCResponseResult{
|
|||
rmcmessage.error_result_with_code(ErrorCode::Core_NotImplemented)
|
||||
}
|
||||
|
||||
pub async fn login_raw_params(rmcmessage: &RMCMessage, _: &Arc<SocketData>, _: &Arc<Mutex<ConnectionData>>, data: AuthProtocolConfig) -> RMCResponseResult{
|
||||
pub async fn login_raw_params(rmcmessage: &RMCMessage, _: &Arc<SocketData>, _: &Arc<Mutex<ConnectionData>>, _data: AuthProtocolConfig) -> RMCResponseResult{
|
||||
let mut reader = Cursor::new(&rmcmessage.rest_of_data);
|
||||
|
||||
let Ok(str) = String::deserialize(&mut reader) else {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use crate::protocols::matchmake_common::{ExtendedMatchmakeSession, MatchmakeData
|
|||
use crate::prudp::socket::{ConnectionData, SocketData};
|
||||
use crate::rmc::message::RMCMessage;
|
||||
use crate::rmc::response::{ErrorCode, RMCResponseResult};
|
||||
use crate::rmc::structures::matchmake::{AutoMatchmakeParam, MatchmakeSession};
|
||||
use crate::rmc::structures::matchmake::{AutoMatchmakeParam};
|
||||
use crate::rmc::structures::RmcSerialize;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use crate::rmc::structures::RmcSerialize;
|
|||
|
||||
type PIDList = Vec<u32>;
|
||||
|
||||
async fn get_playing_session(rmcmessage: &RMCMessage, data: Arc<RwLock<MatchmakeData>>) -> RMCResponseResult {
|
||||
async fn get_playing_session(rmcmessage: &RMCMessage, _data: Arc<RwLock<MatchmakeData>>) -> RMCResponseResult {
|
||||
//todo: propperly implement this
|
||||
|
||||
let cheeseburger = PIDList::new();
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use crate::rmc::structures::RmcSerialize;
|
|||
|
||||
type StringList = Vec<String>;
|
||||
|
||||
pub async fn register(rmcmessage: &RMCMessage, station_urls: Vec<StationUrl>, conn_data: &Arc<Mutex<ConnectionData>>) -> RMCResponseResult{
|
||||
pub async fn register(rmcmessage: &RMCMessage, _station_urls: Vec<StationUrl>, conn_data: &Arc<Mutex<ConnectionData>>) -> RMCResponseResult{
|
||||
let locked = conn_data.lock().await;
|
||||
let Some(active_connection_data) = locked.active_connection_data.as_ref() else {
|
||||
return rmcmessage.error_result_with_code(ErrorCode::RendezVous_NotAuthenticated)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ pub async fn send_report(rmcmessage: &RMCMessage, report_id: u32, data: Vec<u8>)
|
|||
return rmcmessage.success_with_data(Vec::new());
|
||||
}
|
||||
|
||||
pub async fn send_report_raw_params(rmcmessage: &RMCMessage, _: &Arc<SocketData>, conn_data: &Arc<Mutex<ConnectionData>>, _: ()) -> RMCResponseResult{
|
||||
pub async fn send_report_raw_params(rmcmessage: &RMCMessage, _: &Arc<SocketData>, _conn_data: &Arc<Mutex<ConnectionData>>, _: ()) -> RMCResponseResult{
|
||||
let mut reader = Cursor::new(&rmcmessage.rest_of_data);
|
||||
|
||||
let Ok(error_id) = reader.read_struct(IS_BIG_ENDIAN) else {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ impl<'a> RmcSerialize for &'a [u8]{
|
|||
}
|
||||
|
||||
/// DO NOT USE (also maybe split off the serialize and deserialize functions at some point)
|
||||
fn deserialize(reader: &mut dyn Read) -> crate::rmc::structures::Result<Self> {
|
||||
fn deserialize(_reader: &mut dyn Read) -> crate::rmc::structures::Result<Self> {
|
||||
panic!("cannot deserialize to a u8 slice reference (use this ONLY for writing)")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ impl<'a> RmcSerialize for ConnectionData<'a>{
|
|||
})
|
||||
}
|
||||
|
||||
fn deserialize(reader: &mut dyn Read) -> crate::rmc::structures::Result<Self> {
|
||||
fn deserialize(_reader: &mut dyn Read) -> crate::rmc::structures::Result<Self> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ impl RmcSerialize for String{
|
|||
}
|
||||
|
||||
impl RmcSerialize for &str{
|
||||
fn deserialize(reader: &mut dyn Read) -> Result<Self> {
|
||||
fn deserialize(_reader: &mut dyn Read) -> Result<Self> {
|
||||
panic!("cannot serialize to &str")
|
||||
}
|
||||
fn serialize(&self, writer: &mut dyn Write) -> Result<()> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue