Fix dogfood needless-borrow
This commit is contained in:
parent
1b4aba47b7
commit
66eea5e662
1 changed files with 1 additions and 1 deletions
|
|
@ -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| ¶ms.types[0]),
|
||||
], {
|
||||
let slice_ty = format!("&[{}]", snippet(cx, elem_ty.span, "_"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue