]> git.lizzy.rs Git - rust.git/commitdiff
fix doctests for convert::id
authorMazdak <twingoow@gmail.com>
Fri, 19 Jan 2018 02:11:57 +0000 (03:11 +0100)
committerMazdak <twingoow@gmail.com>
Fri, 19 Jan 2018 02:11:57 +0000 (03:11 +0100)
src/libcore/convert.rs

index 77a87fdf1c6f69e4b268157258f5835570a8f30e..41eb1eed4e4601b43654a19c1daee67034b88a09 100644 (file)
 /// #![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);
 /// ```
 ///