fix doctests for convert::id
This commit is contained in:
parent
93debaa306
commit
ac64ef3375
1 changed files with 4 additions and 2 deletions
|
|
@ -82,12 +82,14 @@ use fmt;
|
|||
/// #![feature(convert_id)]
|
||||
/// use std::convert::id;
|
||||
///
|
||||
/// // Let's pretend we have an interesting condition:
|
||||
/// let condition = true;
|
||||
/// # let condition = true;
|
||||
///
|
||||
/// # fn manipulation(x: u32) -> u32 { x + 1 }
|
||||
///
|
||||
/// let do_stuff = if condition { manipulation } else { id };
|
||||
///
|
||||
/// // do more interesting stuff..
|
||||
///
|
||||
/// let _results = do_stuff(42);
|
||||
/// ```
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue