diff options
author | Alan Du <[email protected]> | 2019-06-04 07:28:22 +0100 |
---|---|---|
committer | Alan Du <[email protected]> | 2019-06-04 23:05:07 +0100 |
commit | 619a61529878f82daf7aed571bc4f6a10bd6dd9f (patch) | |
tree | 5a4fa21a4410d353dd0522813df94cc6aea77cdd /crates/ra_hir/src | |
parent | 7bcd8d6290f63a725a62cc7da0269c08c1b6c99b (diff) |
Fix clippy::len_zero
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/path.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/path.rs b/crates/ra_hir/src/path.rs index 1b129c752..67afd5027 100644 --- a/crates/ra_hir/src/path.rs +++ b/crates/ra_hir/src/path.rs | |||
@@ -116,7 +116,7 @@ impl Path { | |||
116 | 116 | ||
117 | /// `true` if this path is just a standalone `self` | 117 | /// `true` if this path is just a standalone `self` |
118 | pub fn is_self(&self) -> bool { | 118 | pub fn is_self(&self) -> bool { |
119 | self.kind == PathKind::Self_ && self.segments.len() == 0 | 119 | self.kind == PathKind::Self_ && self.segments.is_empty() |
120 | } | 120 | } |
121 | 121 | ||
122 | /// If this path is a single identifier, like `foo`, return its name. | 122 | /// If this path is a single identifier, like `foo`, return its name. |
@@ -140,7 +140,7 @@ impl GenericArgs { | |||
140 | args.push(GenericArg::Type(type_ref)); | 140 | args.push(GenericArg::Type(type_ref)); |
141 | } | 141 | } |
142 | // lifetimes and assoc type args ignored for now | 142 | // lifetimes and assoc type args ignored for now |
143 | if args.len() > 0 { | 143 | if !args.is_empty() { |
144 | Some(GenericArgs { args }) | 144 | Some(GenericArgs { args }) |
145 | } else { | 145 | } else { |
146 | None | 146 | None |