some cleanup

This commit is contained in:
Stephan Dilly 2020-03-23 14:27:49 +01:00
parent 0234b9f87b
commit f330226efe
4 changed files with 13 additions and 11 deletions

View file

@ -1,5 +1,7 @@
use crate::components::{CommandInfo, Component}; use crate::{
use crate::ui; components::{CommandInfo, Component},
ui,
};
use asyncgit::{hash, StatusItem, StatusItemType}; use asyncgit::{hash, StatusItem, StatusItemType};
use crossterm::event::{Event, KeyCode}; use crossterm::event::{Event, KeyCode};
use std::{borrow::Cow, cmp}; use std::{borrow::Cow, cmp};

View file

@ -1,6 +1,4 @@
use tui::buffer::Buffer; use tui::{buffer::Buffer, layout::Rect, widgets::Widget};
use tui::layout::Rect;
use tui::widgets::Widget;
pub struct Clear<T: Widget>(T); pub struct Clear<T: Widget>(T);

View file

@ -3,9 +3,9 @@ mod scrolllist;
pub use clear::Clear; pub use clear::Clear;
use scrolllist::ScrollableList; use scrolllist::ScrollableList;
use tui::backend::Backend;
use tui::layout::{Constraint, Direction, Layout, Rect};
use tui::{ use tui::{
backend::Backend,
layout::{Constraint, Direction, Layout, Rect},
style::{Color, Modifier, Style}, style::{Color, Modifier, Style},
widgets::{Block, Borders, Text, Widget}, widgets::{Block, Borders, Text, Widget},
Frame, Frame,

View file

@ -1,8 +1,10 @@
use std::iter::Iterator; use std::iter::Iterator;
use tui::buffer::Buffer; use tui::{
use tui::layout::Rect; buffer::Buffer,
use tui::style::Style; layout::Rect,
use tui::widgets::{Block, List, Text, Widget}; style::Style,
widgets::{Block, List, Text, Widget},
};
/// ///
pub struct ScrollableList<'b, L> pub struct ScrollableList<'b, L>