Rollup merge of #56452 - sinkuu:redundant_clone, r=nikic

Remove redundant clones
This commit is contained in:
Pietro Albini 2018-12-05 23:54:30 +01:00 committed by GitHub
commit 4ff4fc1bc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -309,7 +309,7 @@ fn create_matches(len: usize) -> Box<[Rc<NamedMatchVec>]> {
vec![]
} else {
let empty_matches = Rc::new(SmallVec::new());
vec![empty_matches.clone(); len]
vec![empty_matches; len]
}.into_boxed_slice()
}