mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-24 01:46:31 +00:00
Fix doc test
This commit is contained in:
parent
c486d96810
commit
fc8d428028
@ -328,15 +328,15 @@ impl Cursive {
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// # use cursive::Cursive;
|
||||
/// # use cursive::views::TextView;
|
||||
/// # use cursive::views::{TextView, ViewRef};
|
||||
/// # let mut siv = Cursive::new();
|
||||
/// use cursive::trait::Identifiable;
|
||||
/// use cursive::traits::Identifiable;
|
||||
///
|
||||
/// siv.add_layer(TextView::new("foo").with_id("id"));
|
||||
///
|
||||
/// // Could be called in a callback
|
||||
/// let ref: ViewRef<TextView> = siv.find_id("id").unwrap();
|
||||
/// ref.set_content("bar");
|
||||
/// let mut view: ViewRef<TextView> = siv.find_id("id").unwrap();
|
||||
/// view.set_content("bar");
|
||||
/// ```
|
||||
///
|
||||
/// [`IdView`]: views/struct.IdView.html
|
||||
|
Loading…
Reference in New Issue
Block a user