mem_replace: make examples compilable.
This commit is contained in:
parent
598df08d88
commit
1b6d739ce3
1 changed files with 2 additions and 2 deletions
|
|
@ -15,12 +15,12 @@ use if_chain::if_chain;
|
|||
///
|
||||
/// **Example:**
|
||||
/// ```rust
|
||||
/// let an_option = Some(0);
|
||||
/// let mut an_option = Some(0);
|
||||
/// let replaced = mem::replace(&mut an_option, None);
|
||||
/// ```
|
||||
/// Is better expressed with:
|
||||
/// ```rust
|
||||
/// let an_option = Some(0);
|
||||
/// let mut an_option = Some(0);
|
||||
/// let taken = an_option.take();
|
||||
/// ```
|
||||
declare_clippy_lint! {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue