mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Fix tests & examples
This commit is contained in:
parent
a355171844
commit
ff9f669d73
@ -4,7 +4,7 @@ extern crate rand;
|
||||
use cursive::Cursive;
|
||||
use cursive::traits::*;
|
||||
use cursive::views::{Button, Dialog, LinearLayout, ProgressBar, TextView};
|
||||
use cursive::views::Counter;
|
||||
use cursive::utils::Counter;
|
||||
use rand::Rng;
|
||||
use std::cmp::min;
|
||||
use std::thread;
|
||||
|
@ -123,7 +123,7 @@ impl<'a> Printer<'a> {
|
||||
/// # use cursive::backend;
|
||||
/// # let b = backend::dummy::Backend::init();
|
||||
/// # 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.print((0,0), "This text is highlighted!");
|
||||
/// });
|
||||
@ -201,7 +201,7 @@ impl<'a> Printer<'a> {
|
||||
/// # use cursive::backend;
|
||||
/// # let b = backend::dummy::Backend::init();
|
||||
/// # 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);
|
||||
/// ```
|
||||
pub fn print_box<T: Into<Vec2>, S: Into<Vec2>>(
|
||||
|
@ -234,7 +234,7 @@ impl ScrollBase {
|
||||
/// # let scrollbase = ScrollBase::new();
|
||||
/// # let b = backend::dummy::Backend::init();
|
||||
/// # 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 lines = ["Line 1", "Line number 2"];
|
||||
/// scrollbase.draw(printer, |printer, i| {
|
||||
|
Loading…
Reference in New Issue
Block a user