fix(sender): performed code cleanup with clippy

This commit is contained in:
Patryk Hegenberg 2024-05-01 22:56:44 +02:00
parent f321b6bc6c
commit 4fb2cc1038
3 changed files with 2 additions and 10 deletions

View file

@ -110,13 +110,6 @@ struct Context {
task: Option<JoinHandle<()>>,
}
impl Context {
async fn clean_up(&mut self) {
if let Some(task) = &self.task {
task.abort();
}
}
}
/// This function is called when the client receives a create room packet
/// from the server. The function is responsible for printing a URL to the
/// console that the user can use to join the room.

View file

@ -1,4 +1,3 @@
use std::collections::HashMap;
use tracing::{debug, error};
use local_ip_address::{local_ip, local_ipv6};
@ -55,5 +54,5 @@ pub async fn send_info(
})
.await?;
Ok(result?)
result
}

View file

@ -29,7 +29,7 @@ fn nouns2() -> &'static [&'static str] {
pub fn hash_random_name(name: String) -> String {
let hashed_name = Sha256::digest(name.as_bytes());
return hex::encode(hashed_name);
hex::encode(hashed_name)
}
#[cfg(test)]