mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-26 22:50:56 +00:00
commit
5c090c3f48
2 changed files with 3 additions and 3 deletions
|
@ -82,7 +82,7 @@ fn expr_eq_ident(expr: &Expr, id: Ident) -> bool {
|
|||
match expr.node {
|
||||
ExprPath(None, ref path) => {
|
||||
let arg_segment = [PathSegment { identifier: id, parameters: PathParameters::none() }];
|
||||
!path.global && path.segments == arg_segment
|
||||
!path.global && path.segments[..] == arg_segment
|
||||
}
|
||||
_ => false,
|
||||
}
|
||||
|
|
|
@ -435,9 +435,9 @@ impl OutType {
|
|||
fn matches(&self, ty: &FunctionRetTy) -> bool {
|
||||
match (self, ty) {
|
||||
(&UnitType, &DefaultReturn(_)) => true,
|
||||
(&UnitType, &Return(ref ty)) if ty.node == TyTup(vec![]) => true,
|
||||
(&UnitType, &Return(ref ty)) if ty.node == TyTup(vec![].into()) => true,
|
||||
(&BoolType, &Return(ref ty)) if is_bool(ty) => true,
|
||||
(&AnyType, &Return(ref ty)) if ty.node != TyTup(vec![]) => true,
|
||||
(&AnyType, &Return(ref ty)) if ty.node != TyTup(vec![].into()) => true,
|
||||
(&RefType, &Return(ref ty)) => {
|
||||
if let TyRptr(_, _) = ty.node { true } else { false }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue