From 68638508d4e84ccf3e50a77d92b89334136ba29a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Fri, 26 Oct 2018 14:45:25 +0200 Subject: [PATCH] fix clippy::redundant_clones warnings. --- src/imports.rs | 4 ++-- src/matches.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/imports.rs b/src/imports.rs index deef4d096c9e..14233661227a 100644 --- a/src/imports.rs +++ b/src/imports.rs @@ -248,7 +248,7 @@ impl UseTree { .rewrite(context, shape.offset_left(vis.len())?) .map(|s| { if s.is_empty() { - s.to_owned() + s } else { format!("{}use {};", vis, s) } @@ -592,7 +592,7 @@ fn merge_rest(a: &[UseSegment], b: &[UseSegment], len: usize) -> Option, budget: usize) -> Option= 2 && (block_str[1..].find(|c: char| !c.is_whitespace()).unwrap() == block_str.len() - 2) { - "{}".to_owned() + String::from("{}") } else { - block_str.to_owned() + block_str } }) }