chore: fix warnings
This commit is contained in:
parent
2ae02b4a22
commit
463c9c06da
5 changed files with 4 additions and 20 deletions
|
|
@ -2,7 +2,6 @@ use async_trait::async_trait;
|
|||
|
||||
use crate::{
|
||||
commands::{IrcAction, IrcHandler},
|
||||
sender::IrcResponse,
|
||||
user::User,
|
||||
};
|
||||
|
||||
|
|
@ -12,7 +11,7 @@ pub struct Cap;
|
|||
impl IrcHandler for Cap {
|
||||
async fn handle(
|
||||
&self,
|
||||
arguments: Vec<String>,
|
||||
_arguments: Vec<String>,
|
||||
_authenticated: bool,
|
||||
_user_state: &mut User,
|
||||
) -> super::IrcAction {
|
||||
|
|
|
|||
|
|
@ -111,25 +111,15 @@ impl IrcCommand {
|
|||
user_state,
|
||||
)
|
||||
.await;
|
||||
action.execute(writer, hostname, user_state).await;
|
||||
action.execute(writer, hostname).await;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl IrcAction {
|
||||
pub async fn execute(
|
||||
&self,
|
||||
writer: &mut BufWriter<TcpStream>,
|
||||
hostname: &str,
|
||||
user_state: &mut User,
|
||||
) {
|
||||
pub async fn execute(&self, writer: &mut BufWriter<TcpStream>, hostname: &str) {
|
||||
match self {
|
||||
/*IrcAction::MultipleActions(actions) => {
|
||||
for action in actions {
|
||||
action.execute(writer, hostname, user_state);
|
||||
}
|
||||
}*/
|
||||
IrcAction::SendText(msg) => {
|
||||
msg.send(hostname, writer, false).await.unwrap();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
use async_trait::async_trait;
|
||||
use tokio::sync::broadcast::Sender;
|
||||
|
||||
use crate::{
|
||||
CONNECTED_USERS, SENDER,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
io::{BufRead, BufReader, BufWriter},
|
||||
collections::HashSet,
|
||||
net::{SocketAddr, TcpListener, TcpStream},
|
||||
str::FromStr,
|
||||
sync::mpsc,
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
use std::io::Write;
|
||||
|
||||
use anyhow::Result;
|
||||
use tokio::{
|
||||
io::{AsyncWriteExt, BufWriter},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue