From bad5653152889c66425a9eedd0e630bcd7b2a9ef Mon Sep 17 00:00:00 2001 From: Atila Neves Date: Wed, 28 Feb 2024 12:05:38 +0100 Subject: [PATCH] Move isTestConfig to DubConfigurations --- payload/reggae/dub/interop/dublib.d | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/payload/reggae/dub/interop/dublib.d b/payload/reggae/dub/interop/dublib.d index 222958d4..50b7f15e 100644 --- a/payload/reggae/dub/interop/dublib.d +++ b/payload/reggae/dub/interop/dublib.d @@ -37,6 +37,10 @@ private struct DubConfigurations { bool haveTestConfig() @safe @nogc pure nothrow scope const { return test != ""; } + + bool isTestConfig(in string config) @safe @nogc pure nothrow scope const { + return haveTestConfig && config == test; + } } package struct Dub { @@ -91,9 +95,8 @@ package struct Dub { Exception dubInfoFailure; foreach(config; configs.configurations) { - const isTestConfig = configs.haveTestConfig && config == configs.test; try { - ret[config] = configToDubInfo(output, config, isTestConfig); + ret[config] = configToDubInfo(output, config, configs.isTestConfig(config)); atLeastOneConfigOk = true; } catch(Exception ex) { output.log("ERROR: Could not get info for configuration ", config, ": ", ex.msg);