add how-to example for std::mem::transmute() usage instead of manual swap

This commit is contained in:
Matthias Krüger 2018-08-24 18:41:49 +02:00
parent 72344f466f
commit f7be2a0416

View File

@ -20,6 +20,10 @@ use crate::utils::sugg::Sugg;
/// b = a;
/// a = t;
/// ```
/// Use std::mem::swap():
/// ```rust
/// std::mem::swap(&mut a, &mut b);
/// ```
declare_clippy_lint! {
pub MANUAL_SWAP,
complexity,