diff options
author | Rupert Rutledge <eosis2 [at] gmail.com> | 2020-05-23 11:17:20 +0100 |
---|---|---|
committer | Rupert Rutledge <eosis2 [at] gmail.com> | 2020-05-23 11:17:20 +0100 |
commit | b6f7f4295770e88a0967fcf55ddefbe10a57001d (patch) | |
tree | 4a43685c5de76dd679aef447e84ef62bcddf9369 | |
parent | 83de3dec796aca0795b844e8b036cc05650f4c06 (diff) |
Implement style feedback
Thanks @TheLostLambda
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 0b0ea6d..586b9d0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,21 +17,21 @@ use ::pnet::datalink::{DataLinkReceiver, NetworkInterface}; use ::std::collections::HashMap; use ::std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; use ::std::sync::{Arc, Mutex}; +use ::std::thread; use ::std::thread::park_timeout; -use ::std::{thread, time}; use ::termion::event::{Event, Key}; use ::tui::backend::Backend; use std::process; use ::std::io; -use ::std::time::Instant; +use ::std::time::{Duration, Instant}; use ::termion::raw::IntoRawMode; use ::tui::backend::TermionBackend; use std::sync::RwLock; use structopt::StructOpt; -const DISPLAY_DELTA: time::Duration = time::Duration::from_millis(1000); +const DISPLAY_DELTA: Duration = Duration::from_millis(1000); #[derive(StructOpt, Debug)] #[structopt(name = "bandwhich")] @@ -123,7 +123,7 @@ where let running = Arc::new(AtomicBool::new(true)); let paused = Arc::new(AtomicBool::new(false)); let last_start_time = Arc::new(RwLock::new(Instant::now())); - let cumulative_time = Arc::new(RwLock::new(std::time::Duration::new(0, 0))); + let cumulative_time = Arc::new(RwLock::new(Duration::new(0, 0))); let ui_offset = Arc::new(AtomicUsize::new(0)); let dns_shown = opts.show_dns; |