Fix dogfood needless-borrow

This commit is contained in:
Manish Goregaokar 2017-09-25 19:52:20 -07:00
parent 1b4aba47b7
commit 66eea5e662
No known key found for this signature in database
GPG key ID: 3BBF4D3E2EF79F98

View file

@ -144,7 +144,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
let TyPath(QPath::Resolved(_, ref path)) = input.node,
let Some(elem_ty) = path.segments.iter()
.find(|seg| seg.name == "Vec")
.and_then(|ref ps| ps.parameters.as_ref())
.and_then(|ps| ps.parameters.as_ref())
.map(|params| &params.types[0]),
], {
let slice_ty = format!("&[{}]", snippet(cx, elem_ty.span, "_"));