Remove unused imports

This commit is contained in:
Austen Adler 2022-12-20 22:01:47 -05:00
parent 04fa8381f5
commit 5b47c44e2d
4 changed files with 6 additions and 43 deletions

View File

@ -1,6 +1,5 @@
use crate::event::EventMessage;
use crate::CommandOptions;
use ansi4tui::bytes_to_text;
use anyhow::bail;
use anyhow::Context;
use anyhow::Result;
@ -8,16 +7,13 @@ use crossbeam::channel::Receiver;
use crossbeam::channel::Sender;
use parking_lot::RwLock;
use ropey::Rope;
use std::collections::hash_map::DefaultHasher;
use std::sync::Arc;
use std::{
io::Write,
process::{Command, Stdio},
};
use tui::widgets::Paragraph;
pub type CommandRequest = (Arc<RwLock<CommandOptions>>, Arc<String>);
use crate::App;
#[derive(Debug)]
pub enum CommandCompleted {

View File

@ -1,4 +1,4 @@
#![allow(dead_code, unused_imports)]
// #![allow(dead_code, unused_imports)]
#![warn(clippy::all, clippy::pedantic, clippy::nursery)]
#![allow(clippy::module_name_repetitions, clippy::cast_possible_truncation)]
@ -6,10 +6,8 @@ mod command;
mod event;
mod ui;
mod util;
use ansi4tui::bytes_to_text;
use anyhow::anyhow;
use anyhow::bail;
use anyhow::Context;
use anyhow::Result;
use command::CommandCompleted;
use command::CommandRequest;
@ -25,27 +23,20 @@ use std::fs::File;
use std::str::FromStr;
use std::{
io::{self, Write},
process::{Command, Stdio},
sync::Arc,
thread,
time::Duration,
};
use tracing::instrument;
use tracing::Level;
use tracing_subscriber::Layer;
use tracing_subscriber::{filter, prelude::*};
use tui::text::Text;
use tui::{
backend::{Backend, CrosstermBackend},
layout::{Constraint, Direction, Layout, Rect},
widgets::{Block, Borders, Paragraph, Widget},
Frame, Terminal,
Terminal,
};
use ui::RenderState;
use ui::RenderStates;
use crossterm::{
event::{DisableMouseCapture, EnableMouseCapture, Event, KeyCode},
event::{Event, KeyCode},
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};

View File

@ -2,38 +2,16 @@ use crate::command;
use crate::util;
use crate::App;
use ansi4tui::bytes_to_text;
use anyhow::anyhow;
use anyhow::bail;
use anyhow::Result;
use command::CommandResult;
use crossterm::event::DisableBracketedPaste;
use crossterm::event::EnableBracketedPaste;
use ropey::RopeSlice;
use std::cmp::min;
use std::io::Read;
use std::str::FromStr;
use std::{
io::{self, Write},
process::{Command, Stdio},
sync::Arc,
thread,
time::Duration,
};
use tracing::event;
use tracing::instrument;
use tracing::Level;
use tui::text::Text;
use tui::{
backend::{Backend, CrosstermBackend},
backend::Backend,
layout::{Constraint, Direction, Layout, Rect},
widgets::{Block, Borders, Paragraph, Widget},
Frame, Terminal,
};
use crossterm::{
event::{DisableMouseCapture, EnableMouseCapture, Event, KeyCode},
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
widgets::{Block, Borders, Paragraph},
Frame,
};
#[instrument(skip(f, app))]

View File

@ -2,8 +2,6 @@ use std::collections::hash_map::DefaultHasher;
use std::hash::Hash;
use std::hash::Hasher;
use ropey::RopeSlice;
pub fn hash_bytes(r: &[u8]) -> u64 {
let mut s = DefaultHasher::new();
r.hash(&mut s);