diff --git a/src/path.rs b/src/path.rs index abe5d48..2ae94b3 100644 --- a/src/path.rs +++ b/src/path.rs @@ -172,12 +172,11 @@ impl Printer { } pub fn qpath(&mut self, qself: &Option, path: &Path, kind: PathKind) { - let qself = match qself { - Some(qself) => qself, - None => { - self.path(path, kind); - return; - } + let qself = if let Some(qself) = qself { + qself + } else { + self.path(path, kind); + return; }; assert!(qself.position < path.segments.len());