From 6b2c990642598a7269efef5d3b24615c3696b679 Mon Sep 17 00:00:00 2001 From: Arthur Cohen Date: Wed, 13 Nov 2024 15:05:24 +0100 Subject: [PATCH] clippy: Use if-let where suggested --- src/context.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/context.rs b/src/context.rs index dc0b3751..f716c750 100644 --- a/src/context.rs +++ b/src/context.rs @@ -132,12 +132,9 @@ impl Context { self.error_handler .set_path(self.path.clone().unwrap_or_default()); - match &self.path { - Some(p) => { - self.included.insert(p.clone()); - } - None => {} - }; + if let Some(p) = &self.path { + self.included.insert(p.clone()); + } } /// Add an error to the context