forked from trinitrix/core
Style(treewide): Remove unneeded imports
This commit is contained in:
parent
200b9143b3
commit
20be391b9e
|
@ -1,12 +1,8 @@
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
|
||||||
use anyhow::{Error, Result};
|
use anyhow::{Error, Result};
|
||||||
use cli_log::{error, info, warn};
|
use cli_log::{error, info};
|
||||||
use matrix_sdk::{
|
use matrix_sdk::{ruma::exports::serde_json, Client, Session};
|
||||||
config::SyncSettings,
|
|
||||||
ruma::{events::room::message::SyncRoomMessageEvent, exports::serde_json, user_id},
|
|
||||||
Client, Session,
|
|
||||||
};
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
|
|
@ -1,26 +1,13 @@
|
||||||
use anyhow::{Error, Result};
|
use anyhow::{Error, Result};
|
||||||
use cli_log::{error, info, warn};
|
|
||||||
use crossterm::event::{KeyCode, KeyEvent, KeyModifiers};
|
use crossterm::event::{KeyCode, KeyEvent, KeyModifiers};
|
||||||
use matrix_sdk::{
|
use matrix_sdk::{config::SyncSettings, Client, LoopCtrl};
|
||||||
config::SyncSettings,
|
use tokio::{sync::mpsc, time::Duration};
|
||||||
room::Room,
|
|
||||||
ruma::events::room::{
|
|
||||||
member::StrippedRoomMemberEvent,
|
|
||||||
message::{MessageType, OriginalSyncRoomMessageEvent, RoomMessageEventContent},
|
|
||||||
},
|
|
||||||
Client, LoopCtrl,
|
|
||||||
};
|
|
||||||
use tokio::{
|
|
||||||
sync::{broadcast, mpsc},
|
|
||||||
time::Duration,
|
|
||||||
};
|
|
||||||
use tokio_util::sync::CancellationToken;
|
use tokio_util::sync::CancellationToken;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
app::{
|
app::{status::State, App},
|
||||||
status::{State, Status},
|
|
||||||
App,
|
|
||||||
},
|
|
||||||
ui,
|
ui,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,22 +5,10 @@ use std::path::Path;
|
||||||
|
|
||||||
use accounts::{Account, AccountsManager};
|
use accounts::{Account, AccountsManager};
|
||||||
use anyhow::{Error, Result};
|
use anyhow::{Error, Result};
|
||||||
use cli_log::{error, info, warn};
|
use cli_log::info;
|
||||||
use matrix_sdk::{
|
use matrix_sdk::Client;
|
||||||
config::SyncSettings,
|
|
||||||
event_handler::Ctx,
|
|
||||||
room::Room,
|
|
||||||
ruma::events::room::{
|
|
||||||
member::StrippedRoomMemberEvent,
|
|
||||||
message::{MessageType, OriginalSyncRoomMessageEvent, RoomMessageEventContent},
|
|
||||||
},
|
|
||||||
Client,
|
|
||||||
};
|
|
||||||
use status::{State, Status};
|
use status::{State, Status};
|
||||||
use tokio::{
|
use tokio::sync::mpsc;
|
||||||
sync::{broadcast, mpsc},
|
|
||||||
time::{sleep, Duration},
|
|
||||||
};
|
|
||||||
use tokio_util::sync::CancellationToken;
|
use tokio_util::sync::CancellationToken;
|
||||||
|
|
||||||
use crate::{accounts, ui};
|
use crate::{accounts, ui};
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
use std::any::Any;
|
|
||||||
|
|
||||||
use anyhow::{Error, Result};
|
use anyhow::{Error, Result};
|
||||||
use cli_log::{error, info, warn};
|
use cli_log::{warn, info};
|
||||||
use indexmap::IndexMap;
|
use indexmap::IndexMap;
|
||||||
use matrix_sdk::{
|
use matrix_sdk::{
|
||||||
room::MessagesOptions,
|
room::MessagesOptions,
|
||||||
|
|
|
@ -2,8 +2,6 @@ mod accounts;
|
||||||
mod app;
|
mod app;
|
||||||
mod ui;
|
mod ui;
|
||||||
|
|
||||||
use cli_log::{error, info, warn};
|
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> anyhow::Result<()> {
|
async fn main() -> anyhow::Result<()> {
|
||||||
cli_log::init_cli_log!();
|
cli_log::init_cli_log!();
|
||||||
|
|
|
@ -1,26 +1,22 @@
|
||||||
use std::{cmp, io, io::Stdout};
|
use std::{cmp, io, io::Stdout};
|
||||||
|
|
||||||
use anyhow::{Error, Result};
|
use anyhow::{Error, Result};
|
||||||
use cli_log::{error, info, warn};
|
use cli_log::info;
|
||||||
use crossterm::{
|
use crossterm::{
|
||||||
event::{self, read, DisableMouseCapture, EnableMouseCapture, Event},
|
event::{DisableMouseCapture, EnableMouseCapture},
|
||||||
execute,
|
execute,
|
||||||
style::style,
|
|
||||||
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
|
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
|
||||||
};
|
};
|
||||||
use matrix_sdk::{
|
use matrix_sdk::ruma::events::{AnyMessageLikeEvent, AnyTimelineEvent};
|
||||||
room::MessagesOptions,
|
|
||||||
ruma::events::{AnyMessageLikeEvent, AnyTimelineEvent},
|
|
||||||
};
|
|
||||||
use tui::{
|
use tui::{
|
||||||
backend::CrosstermBackend,
|
backend::CrosstermBackend,
|
||||||
layout::{Alignment, Constraint, Corner, Direction, Layout},
|
layout::{Alignment, Constraint, Corner, Direction, Layout},
|
||||||
style::{Color, Modifier, Style},
|
style::{Color, Modifier, Style},
|
||||||
text::{Span, Spans, Text},
|
text::{Span, Spans, Text},
|
||||||
widgets::{Block, Borders, List, ListItem, ListState, Paragraph, Widget, Wrap},
|
widgets::{Block, Borders, List, ListItem, ListState, Paragraph},
|
||||||
Frame, Terminal,
|
Terminal,
|
||||||
};
|
};
|
||||||
use tui_textarea::{Input, Key, TextArea};
|
use tui_textarea::TextArea;
|
||||||
|
|
||||||
use crate::app::status::Status;
|
use crate::app::status::Status;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue