Reorganized code, allowing dead structure attributes.

This commit is contained in:
Xithrius 2021-08-23 16:46:14 -07:00
parent a63a6ed401
commit a4aa58f72f
No known key found for this signature in database
GPG Key ID: BD0FC909FA912B62
2 changed files with 6 additions and 8 deletions

View File

@ -1,9 +1,7 @@
use std::sync::mpsc::Sender;
use dotenv;
use futures::prelude::*;
use irc::client::prelude::*;
use tokio;
#[tokio::main]
pub async fn twitch_irc(tx: &Sender<Vec<String>>) {

View File

@ -1,9 +1,9 @@
use std::io;
use std::sync::mpsc;
use std::sync::{
atomic::{AtomicBool, Ordering},
Arc,
atomic::{AtomicBool, Ordering},
};
use std::sync::mpsc;
use std::thread;
use std::time::Duration;
@ -15,8 +15,12 @@ pub enum Event<I> {
Tick,
}
#[allow(dead_code)]
pub struct Events {
rx: mpsc::Receiver<Event<Key>>,
input_handle: thread::JoinHandle<()>,
ignore_exit_key: Arc<AtomicBool>,
tick_handle: thread::JoinHandle<()>,
}
#[derive(Debug, Clone, Copy)]
@ -35,10 +39,6 @@ impl Default for Config {
}
impl Events {
pub fn new() -> Events {
Events::with_config(Config::default())
}
pub fn with_config(config: Config) -> Events {
let (tx, rx) = mpsc::channel();
let ignore_exit_key = Arc::new(AtomicBool::new(false));