From 296831f641b2ce43f179ec710c3ef76726ef96e2 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 17 Mar 2023 10:33:48 -0400 Subject: Move enabled experimental feature to libutil struct This is needed in subsequent commits to allow the settings and CLI args infrastructure itself to read this setting. --- src/libstore/globals.cc | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/libstore/globals.cc') diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index fae79c1a0..8781e10ea 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -166,18 +166,6 @@ StringSet Settings::getDefaultExtraPlatforms() return extraPlatforms; } -bool Settings::isExperimentalFeatureEnabled(const ExperimentalFeature & feature) -{ - auto & f = experimentalFeatures.get(); - return std::find(f.begin(), f.end(), feature) != f.end(); -} - -void Settings::requireExperimentalFeature(const ExperimentalFeature & feature) -{ - if (!isExperimentalFeatureEnabled(feature)) - throw MissingExperimentalFeature(feature); -} - bool Settings::isWSL1() { struct utsname utsbuf; -- cgit v1.2.3