Skip to content

Commit

Permalink
Rollup merge of rust-lang#55047 - tshepang:simple, r=alexcrichton
Browse files Browse the repository at this point in the history
doc: make core::fmt::Error example more simple
  • Loading branch information
Manishearth committed Oct 15, 2018
2 parents 78765e5 + af6c871 commit dc87247
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/libcore/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ pub type Result = result::Result<(), Error>;
/// use std::fmt::{self, write};
///
/// let mut output = String::new();
/// match write(&mut output, format_args!("Hello {}!", "world")) {
/// Err(fmt::Error) => panic!("An error occurred"),
/// _ => (),
/// if let Err(fmt::Error) = write(&mut output, format_args!("Hello {}!", "world")) {
/// panic!("An error occurred");
/// }
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down

0 comments on commit dc87247

Please sign in to comment.