aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/path.rs4
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