From 9bb168bcef5e31d42f9f01c2ec3d20982bd515ef Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 20 May 2021 00:15:25 +0100 Subject: [PATCH] bundles: Refactor slightly to make room for specs Signed-off-by: Ian Jackson --- src/bundles.rs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/bundles.rs b/src/bundles.rs index 0bca4eab..b2183532 100644 --- a/src/bundles.rs +++ b/src/bundles.rs @@ -552,15 +552,18 @@ fn parse_bundle(id: Id, instance: &InstanceName, file: File, eh: EH, if let Some(dir) = split.next(); if let Some(file) = split.next(); if let None = split.next(); - if unicase::eq(dir, "library"); - if let Some((base, ext)) = file.rsplit_once('.'); - if unicase::eq(ext, "toml"); then { - libs.push(LibScanned { - dir_inzip: format!("{}/{}", &dir, &base), - libname: base.to_lowercase(), - inzip: i, - }); + if unicase::eq(dir, "library") { if_chain!{ + if let Some((base, ext)) = file.rsplit_once('.'); + if unicase::eq(ext, "toml"); + then { + libs.push(LibScanned { + dir_inzip: format!("{}/{}", &dir, &base), + libname: base.to_lowercase(), + inzip: i, + }); + } + }} } }), ||())?; } -- 2.30.2