Fix doc comment

This commit is contained in:
Alexandre Bury 2017-06-12 18:03:52 -07:00
parent 5c42a59954
commit 9f5ce65e34
2 changed files with 6 additions and 3 deletions

View File

@ -123,7 +123,8 @@ impl<'a> Printer<'a> {
/// # use cursive::theme;
/// # use cursive::backend::{self, Backend};
/// # let b = backend::Concrete::init();
/// # let printer = Printer::new((6,4), theme::load_default(), &b);
/// # let t = theme::load_default();
/// # let printer = Printer::new((6,4), &t, &b);
/// printer.with_color(theme::ColorStyle::Highlight, |printer| {
/// printer.print((0,0), "This text is highlighted!");
/// });
@ -156,7 +157,8 @@ impl<'a> Printer<'a> {
/// # use cursive::theme;
/// # use cursive::backend::{self, Backend};
/// # let b = backend::Concrete::init();
/// # let printer = Printer::new((6,4), theme::load_default(), &b);
/// # let t = theme::load_default();
/// # 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>>(&self, start: T, size: S,

View File

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