diff options
Diffstat (limited to 'vendor/if_chain/src')
-rw-r--r-- | vendor/if_chain/src/lib.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/if_chain/src/lib.rs b/vendor/if_chain/src/lib.rs index e72f7aa88..dee02a9f0 100644 --- a/vendor/if_chain/src/lib.rs +++ b/vendor/if_chain/src/lib.rs @@ -100,7 +100,7 @@ //! ``` //! //! ## Type ascription -//! +//! //! ```rust,ignore //! let mut x = some_generic_computation(); //! if_chain! { @@ -110,9 +110,9 @@ //! else { x += 1 } //! } //! ``` -//! +//! //! becomes -//! +//! //! ```rust,ignore //! let mut x = some_generic_computation(); //! if x > 7 { @@ -122,7 +122,7 @@ //! x += 1 //! } //! ``` -//! +//! //! ## Multiple patterns //! //! ```rust,ignore @@ -193,7 +193,7 @@ macro_rules! __if_chain { // `let` with multiple patterns (@expand { $($other:tt)* } let $pat1:pat | $($pat:pat)|+ = $expr:expr; $($tt:tt)+) => { match $expr { - $pat1 | $($pat)|+ => __if_chain! { @expand { $($other)* } $($tt)+ } + $pat1 | $($pat)|+ => { __if_chain! { @expand { $($other)* } $($tt)+ } } } }; // `if let` with a single pattern @@ -308,7 +308,7 @@ mod tests { then { x += y; } else { x += 1; } - }; + } assert_eq!(x, 3); } } |