From: Ian Jackson Date: Wed, 19 May 2021 23:15:25 +0000 (+0100) Subject: bundles: Refactor slightly to make room for specs X-Git-Tag: otter-0.6.0~134 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9bb168bcef5e31d42f9f01c2ec3d20982bd515ef;p=otter.git bundles: Refactor slightly to make room for specs Signed-off-by: Ian Jackson --- 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, + }); + } + }} } }), ||())?; }