Clean up imports
This commit is contained in:
parent
fbc24a1154
commit
95d1f3295f
4 changed files with 11 additions and 15 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
use std::net::SocketAddr;
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use std::{fmt, io, result};
|
use std::{fmt, io, result};
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ use std::time::Duration;
|
||||||
use anyhow::anyhow;
|
use anyhow::anyhow;
|
||||||
use cove_core::conn::{self, ConnMaintenance, ConnRx, ConnTx};
|
use cove_core::conn::{self, ConnMaintenance, ConnRx, ConnTx};
|
||||||
use cove_core::packets::{
|
use cove_core::packets::{
|
||||||
Cmd, IdentifyCmd, IdentifyRpl, JoinNtf, NickCmd, NickNtf, NickRpl, Packet, PartNtf, SendCmd,
|
Cmd, JoinNtf, NickCmd, NickNtf, NickRpl, Packet, PartNtf, SendCmd, SendNtf, SendRpl, WhoCmd,
|
||||||
SendNtf, SendRpl, WhoCmd, WhoRpl,
|
WhoRpl,
|
||||||
};
|
};
|
||||||
use cove_core::{Identity, Message, MessageId, Session, SessionId};
|
use cove_core::{Message, MessageId, Session, SessionId};
|
||||||
use log::{info, warn};
|
use log::{info, warn};
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
use tokio::net::{TcpListener, TcpStream};
|
use tokio::net::{TcpListener, TcpStream};
|
||||||
|
|
|
||||||
|
|
@ -4,21 +4,18 @@ mod replies;
|
||||||
mod room;
|
mod room;
|
||||||
|
|
||||||
use std::io::{self, Stdout};
|
use std::io::{self, Stdout};
|
||||||
use std::time::Duration;
|
|
||||||
|
|
||||||
use config::Config;
|
use config::Config;
|
||||||
use crossterm::event::{DisableMouseCapture, EnableMouseCapture};
|
use crossterm::event::{DisableMouseCapture, EnableMouseCapture};
|
||||||
use crossterm::execute;
|
use crossterm::execute;
|
||||||
use crossterm::terminal::{EnterAlternateScreen, LeaveAlternateScreen};
|
use crossterm::terminal::{EnterAlternateScreen, LeaveAlternateScreen};
|
||||||
use palette::rgb::Rgb;
|
use palette::rgb::Rgb;
|
||||||
use palette::{FromColor, Hsl, Hsv, Saturate, Srgb};
|
use palette::{FromColor, Hsl, Srgb};
|
||||||
use tokio::time;
|
|
||||||
use tui::backend::CrosstermBackend;
|
use tui::backend::CrosstermBackend;
|
||||||
use tui::layout::{Constraint, Corner, Direction, Layout};
|
use tui::layout::{Constraint, Direction, Layout};
|
||||||
use tui::style::{Color, Modifier, Style};
|
use tui::style::{Color, Modifier, Style};
|
||||||
use tui::symbols::line::VERTICAL;
|
|
||||||
use tui::text::{Span, Spans};
|
use tui::text::{Span, Spans};
|
||||||
use tui::widgets::{Block, Borders, Cell, List, ListItem, ListState, Paragraph, Row, Table, Tabs};
|
use tui::widgets::{Block, Borders, List, ListItem, ListState, Paragraph};
|
||||||
use tui::Terminal;
|
use tui::Terminal;
|
||||||
|
|
||||||
async fn run(terminal: &mut Terminal<CrosstermBackend<Stdout>>) -> anyhow::Result<()> {
|
async fn run(terminal: &mut Terminal<CrosstermBackend<Stdout>>) -> anyhow::Result<()> {
|
||||||
|
|
@ -107,7 +104,10 @@ async fn run(terminal: &mut Terminal<CrosstermBackend<Stdout>>) -> anyhow::Resul
|
||||||
ListItem::new(Span::styled("SuperGeek", userstyle(192, 242, 203))),
|
ListItem::new(Span::styled("SuperGeek", userstyle(192, 242, 203))),
|
||||||
ListItem::new(Span::styled("certainlyhominid", userstyle(192, 242, 209))),
|
ListItem::new(Span::styled("certainlyhominid", userstyle(192, 242, 209))),
|
||||||
ListItem::new(Span::styled("Plugh", userstyle(192, 242, 215))),
|
ListItem::new(Span::styled("Plugh", userstyle(192, 242, 215))),
|
||||||
ListItem::new(Span::styled("🎼\u{fe0e}🎷🎷🎷🎼\u{fe0e}", userstyle(242, 192, 192))),
|
ListItem::new(Span::styled(
|
||||||
|
"🎼\u{fe0e}🎷🎷🎷🎼\u{fe0e}",
|
||||||
|
userstyle(242, 192, 192),
|
||||||
|
)),
|
||||||
]),
|
]),
|
||||||
nchunks[1],
|
nchunks[1],
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
use std::any;
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use anyhow::bail;
|
|
||||||
use cove_core::conn::{self, ConnMaintenance, ConnRx, ConnTx};
|
use cove_core::conn::{self, ConnMaintenance, ConnRx, ConnTx};
|
||||||
use cove_core::packets::{
|
use cove_core::packets::{
|
||||||
Cmd, IdentifyCmd, IdentifyRpl, JoinNtf, NickRpl, Ntf, Packet, RoomCmd, RoomRpl, Rpl, SendRpl,
|
Cmd, IdentifyCmd, IdentifyRpl, NickRpl, Ntf, Packet, RoomRpl, Rpl, SendRpl, WhoRpl,
|
||||||
WhoRpl,
|
|
||||||
};
|
};
|
||||||
use cove_core::{Session, SessionId};
|
use cove_core::{Session, SessionId};
|
||||||
use tokio::sync::oneshot::{self, Sender};
|
use tokio::sync::oneshot::{self, Sender};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue