Fix doc tests

This commit is contained in:
flip1995 2019-08-01 12:53:20 +02:00
parent 7a73b8fdfa
commit feca48d8a2
No known key found for this signature in database
GPG key ID: 693086869D506637

View file

@ -18,6 +18,8 @@ declare_clippy_lint! {
///
/// **Example:**
/// ```rust
/// # let option = Some(0);
/// # fn do_something_with(_x: usize) {}
/// if option.is_some() {
/// do_something_with(option.unwrap())
/// }
@ -26,6 +28,8 @@ declare_clippy_lint! {
/// Could be written:
///
/// ```rust
/// # let option = Some(0);
/// # fn do_something_with(_x: usize) {}
/// if let Some(value) = option {
/// do_something_with(value)
/// }
@ -45,6 +49,8 @@ declare_clippy_lint! {
///
/// **Example:**
/// ```rust
/// # let option = Some(0);
/// # fn do_something_with(_x: usize) {}
/// if option.is_none() {
/// do_something_with(option.unwrap())
/// }