diff options
Diffstat (limited to 'lib/src/lints')
-rw-r--r-- | lib/src/lints/manual_inherit_from.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/src/lints/manual_inherit_from.rs b/lib/src/lints/manual_inherit_from.rs index 355ed8a..794aaf9 100644 --- a/lib/src/lints/manual_inherit_from.rs +++ b/lib/src/lints/manual_inherit_from.rs | |||
@@ -22,6 +22,7 @@ impl Rule for ManualInherit { | |||
22 | if let Some(key_value_stmt) = KeyValue::cast(node.clone()); | 22 | if let Some(key_value_stmt) = KeyValue::cast(node.clone()); |
23 | if let mut key_path = key_value_stmt.key()?.path(); | 23 | if let mut key_path = key_value_stmt.key()?.path(); |
24 | if let Some(key_node) = key_path.next(); | 24 | if let Some(key_node) = key_path.next(); |
25 | // ensure that path has exactly one component | ||
25 | if key_path.next().is_none(); | 26 | if key_path.next().is_none(); |
26 | if let Some(key) = Ident::cast(key_node); | 27 | if let Some(key) = Ident::cast(key_node); |
27 | 28 | ||