[src] Fix build and tests

This commit is contained in:
Florian Dehau 2017-12-26 17:09:04 +01:00
parent 151d7e8a1c
commit c3c5109c5a
15 changed files with 18 additions and 18 deletions

View file

@ -7,7 +7,7 @@ use termion::input::TermRead;
use tui::Terminal;
use tui::backend::MouseBackend;
use tui::widgets::{Borders, Block, Widget};
use tui::widgets::{Block, Borders, Widget};
use tui::layout::{Direction, Group, Rect, Size};
use tui::style::{Color, Modifier, Style};

View file

@ -11,7 +11,7 @@ use termion::input::TermRead;
use tui::Terminal;
use tui::backend::MouseBackend;
use tui::widgets::{Borders, Block, Widget};
use tui::widgets::{Block, Borders, Widget};
use tui::widgets::canvas::{Canvas, Line, Map, MapResolution};
use tui::layout::{Direction, Group, Rect, Size};
use tui::style::Color;

View file

@ -14,7 +14,7 @@ use termion::input::TermRead;
use tui::Terminal;
use tui::backend::MouseBackend;
use tui::widgets::{Borders, Axis, Block, Chart, Dataset, Marker, Widget};
use tui::widgets::{Axis, Block, Borders, Chart, Dataset, Marker, Widget};
use tui::layout::Rect;
use tui::style::{Color, Modifier, Style};

View file

@ -16,7 +16,7 @@ use termion::input::TermRead;
use tui::Terminal;
use tui::backend::MouseBackend;
use tui::widgets::{Borders, Axis, BarChart, Block, Chart, Dataset, Gauge, Item, List, Marker,
use tui::widgets::{Axis, BarChart, Block, Borders, Chart, Dataset, Gauge, Item, List, Marker,
Paragraph, Row, SelectableList, Sparkline, Table, Tabs, Widget};
use tui::widgets::canvas::{Canvas, Line, Map, MapResolution};
use tui::layout::{Direction, Group, Rect, Size};

View file

@ -11,7 +11,7 @@ use termion::input::TermRead;
use tui::Terminal;
use tui::backend::MouseBackend;
use tui::widgets::{Borders, Block, Gauge, Widget};
use tui::widgets::{Block, Borders, Gauge, Widget};
use tui::layout::{Direction, Group, Rect, Size};
use tui::style::{Color, Modifier, Style};

View file

@ -11,7 +11,7 @@ use termion::input::TermRead;
use tui::Terminal;
use tui::backend::MouseBackend;
use tui::widgets::{Borders, Block, Item, List, SelectableList, Widget};
use tui::widgets::{Block, Borders, Item, List, SelectableList, Widget};
use tui::layout::{Direction, Group, Rect, Size};
use tui::style::{Color, Modifier, Style};

View file

@ -6,7 +6,7 @@ use rustbox::Key;
use tui::Terminal;
use tui::backend::RustboxBackend;
use tui::widgets::{Borders, Block, Paragraph, Widget};
use tui::widgets::{Block, Borders, Paragraph, Widget};
use tui::layout::{Direction, Group, Size};
use tui::style::{Color, Modifier, Style};

View file

@ -14,7 +14,7 @@ use termion::input::TermRead;
use tui::Terminal;
use tui::backend::MouseBackend;
use tui::widgets::{Borders, Block, Sparkline, Widget};
use tui::widgets::{Block, Borders, Sparkline, Widget};
use tui::layout::{Direction, Group, Rect, Size};
use tui::style::{Color, Style};

View file

@ -8,7 +8,7 @@ use termion::input::TermRead;
use tui::Terminal;
use tui::backend::MouseBackend;
use tui::widgets::{Borders, Block, Row, Table, Widget};
use tui::widgets::{Block, Borders, Row, Table, Widget};
use tui::layout::{Direction, Group, Rect, Size};
use tui::style::{Color, Modifier, Style};

View file

@ -10,7 +10,7 @@ use termion::input::TermRead;
use tui::Terminal;
use tui::backend::MouseBackend;
use tui::widgets::{Borders, Block, Tabs, Widget};
use tui::widgets::{Block, Borders, Tabs, Widget};
use tui::layout::{Direction, Group, Rect, Size};
use tui::style::{Color, Style};

View file

@ -115,11 +115,11 @@ impl Buffer {
/// Returns a Buffer with all cells set to the default one
pub fn empty(area: Rect) -> Buffer {
let cell: Cell = Default::default();
Buffer::filled(area, cell)
Buffer::filled(area, &cell)
}
/// Returns a Buffer with all cells initialized with the attributes of the given Cell
pub fn filled(area: Rect, cell: Cell) -> Buffer {
pub fn filled(area: Rect, cell: &Cell) -> Buffer {
let size = area.area() as usize;
let mut content = Vec::with_capacity(size);
for _ in 0..size {
@ -219,7 +219,7 @@ impl Buffer {
}
/// Merge an other buffer into this one
pub fn merge(&mut self, other: Buffer) {
pub fn merge(&mut self, other: &Buffer) {
let area = self.area.union(&other.area);
let cell: Cell = Default::default();
self.content.resize(area.area() as usize, cell.clone());

View file

@ -68,7 +68,7 @@
//!
//! use tui::Terminal;
//! use tui::backend::RawBackend;
//! use tui::widgets::{Widget, Block, border};
//! use tui::widgets::{Widget, Block, Borders};
//! use tui::layout::{Group, Size, Direction};
//!
//! fn main() {
@ -108,7 +108,7 @@
//!
//! use tui::Terminal;
//! use tui::backend::RawBackend;
//! use tui::widgets::{Widget, Block, border};
//! use tui::widgets::{Widget, Block, Borders};
//! use tui::layout::{Group, Size, Direction};
//!
//! fn main() {

View file

@ -11,7 +11,7 @@ use symbols::line;
///
/// ```
/// # extern crate tui;
/// # use tui::widgets::{Block, Border};
/// # use tui::widgets::{Block, Borders};
/// # use tui::style::{Style, Color};
/// # fn main() {
/// Block::default()

View file

@ -138,7 +138,7 @@ impl<'a> Context<'a> {
///
/// ```
/// # extern crate tui;
/// # use tui::widgets::{Block, border};
/// # use tui::widgets::{Block, Borders};
/// # use tui::widgets::canvas::{Canvas, Shape, Line, Map, MapResolution};
/// # use tui::style::Color;
/// # fn main() {

View file

@ -11,7 +11,7 @@ use layout::Rect;
///
/// ```
/// # extern crate tui;
/// # use tui::widgets::{Widget, Gauge, Block, border};
/// # use tui::widgets::{Widget, Gauge, Block, Borders};
/// # use tui::style::{Style, Color, Modifier};
/// # fn main() {
/// Gauge::default()