Fix tests & examples

This commit is contained in:
Alexandre Bury 2018-04-10 12:50:40 -07:00
parent a355171844
commit ff9f669d73
3 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ extern crate rand;
use cursive::Cursive; use cursive::Cursive;
use cursive::traits::*; use cursive::traits::*;
use cursive::views::{Button, Dialog, LinearLayout, ProgressBar, TextView}; use cursive::views::{Button, Dialog, LinearLayout, ProgressBar, TextView};
use cursive::views::Counter; use cursive::utils::Counter;
use rand::Rng; use rand::Rng;
use std::cmp::min; use std::cmp::min;
use std::thread; use std::thread;

View File

@ -123,7 +123,7 @@ impl<'a> Printer<'a> {
/// # use cursive::backend; /// # use cursive::backend;
/// # let b = backend::dummy::Backend::init(); /// # let b = backend::dummy::Backend::init();
/// # let t = theme::load_default(); /// # let t = theme::load_default();
/// # let printer = Printer::new((6,4), &t, &b); /// # let printer = Printer::new((6,4), &t, &*b);
/// printer.with_color(theme::ColorStyle::highlight(), |printer| { /// printer.with_color(theme::ColorStyle::highlight(), |printer| {
/// printer.print((0,0), "This text is highlighted!"); /// printer.print((0,0), "This text is highlighted!");
/// }); /// });
@ -201,7 +201,7 @@ impl<'a> Printer<'a> {
/// # use cursive::backend; /// # use cursive::backend;
/// # let b = backend::dummy::Backend::init(); /// # let b = backend::dummy::Backend::init();
/// # let t = theme::load_default(); /// # let t = theme::load_default();
/// # let printer = Printer::new((6,4), &t, &b); /// # let printer = Printer::new((6,4), &t, &*b);
/// printer.print_box((0,0), (6,4), false); /// printer.print_box((0,0), (6,4), false);
/// ``` /// ```
pub fn print_box<T: Into<Vec2>, S: Into<Vec2>>( pub fn print_box<T: Into<Vec2>, S: Into<Vec2>>(

View File

@ -234,7 +234,7 @@ impl ScrollBase {
/// # let scrollbase = ScrollBase::new(); /// # let scrollbase = ScrollBase::new();
/// # let b = backend::dummy::Backend::init(); /// # let b = backend::dummy::Backend::init();
/// # let t = theme::load_default(); /// # let t = theme::load_default();
/// # let printer = Printer::new((5,1), &t, &b); /// # let printer = Printer::new((5,1), &t, &*b);
/// # let printer = &printer; /// # let printer = &printer;
/// let lines = ["Line 1", "Line number 2"]; /// let lines = ["Line 1", "Line number 2"];
/// scrollbase.draw(printer, |printer, i| { /// scrollbase.draw(printer, |printer, i| {