]> git.lizzy.rs Git - rust.git/commitdiff
Replace another occurrence of "".to_owned()
authorflip1995 <9744647+flip1995@users.noreply.github.com>
Sat, 15 Sep 2018 09:25:40 +0000 (11:25 +0200)
committerflip1995 <9744647+flip1995@users.noreply.github.com>
Sat, 15 Sep 2018 09:25:40 +0000 (11:25 +0200)
clippy_lints/src/swap.rs

index c6668288a556ee307f46e3350af9f6c668c2e955..cd3a7259aae32b44584143a48d65415d42627138 100644 (file)
@@ -125,7 +125,7 @@ fn check_for_slice<'a>(
                     (true, format!(" `{}` and `{}`", first, second),
                         format!("std::mem::swap({}, {})", first.mut_addr(), second.mut_addr()))
                 } else {
-                    (true, "".to_owned(), "".to_owned())
+                    (true, String::new(), String::new())
                 };
 
                 let span = w[0].span.to(second.span);