From 01977fffdd0ecf45211f8b63ae9f1ae56fd3d9c9 Mon Sep 17 00:00:00 2001 From: ClementTsang Date: Fri, 28 Feb 2020 23:02:16 -0500 Subject: [PATCH] Another import optimization. --- src/app/data_farmer.rs | 2 +- src/canvas.rs | 2 +- src/data_conversion.rs | 2 +- src/main.rs | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/data_farmer.rs b/src/app/data_farmer.rs index 6552a8ec..c32a62d3 100644 --- a/src/app/data_farmer.rs +++ b/src/app/data_farmer.rs @@ -15,7 +15,7 @@ use std::time::Instant; use std::vec::Vec; -use crate::data_harvester::{cpu, disks, mem, network, processes, temperature, Data}; +use crate::data_harvester::{cpu, Data, disks, mem, network, processes, temperature}; pub type TimeOffset = f64; pub type Value = f64; diff --git a/src/canvas.rs b/src/canvas.rs index 64d325fe..b3ce3a50 100644 --- a/src/canvas.rs +++ b/src/canvas.rs @@ -5,9 +5,9 @@ use tui::{ backend, layout::{Alignment, Constraint, Direction, Layout, Rect}, style::{Color, Style}, + Terminal, terminal::Frame, widgets::{Axis, Block, Borders, Chart, Dataset, Marker, Paragraph, Row, Table, Text, Widget}, - Terminal, }; use unicode_segmentation::UnicodeSegmentation; use unicode_width::UnicodeWidthStr; diff --git a/src/data_conversion.rs b/src/data_conversion.rs index 9302eae2..d1b07622 100644 --- a/src/data_conversion.rs +++ b/src/data_conversion.rs @@ -7,9 +7,9 @@ use constants::*; use crate::{ app::{ + App, data_farmer, data_harvester::{self, processes::ProcessHarvest}, - App, }, constants, utils::gen_util::{get_exact_byte_values, get_simple_byte_values}, diff --git a/src/main.rs b/src/main.rs index 18061db6..4cf9ab25 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,20 +20,20 @@ use std::{ use crossterm::{ event::{ - poll, read, DisableMouseCapture, EnableMouseCapture, Event as CEvent, KeyCode, KeyEvent, - KeyModifiers, MouseEvent, + DisableMouseCapture, EnableMouseCapture, Event as CEvent, KeyCode, KeyEvent, KeyModifiers, MouseEvent, + poll, read, }, execute, style::Print, - terminal::LeaveAlternateScreen, terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen}, + terminal::LeaveAlternateScreen, }; use serde::Deserialize; use tui::{backend::CrosstermBackend, Terminal}; use app::{ - data_harvester::{self, processes::ProcessSorting}, App, + data_harvester::{self, processes::ProcessSorting}, }; use constants::*; use data_conversion::*;