Feature::from_str is not always needed

This commit is contained in:
gnzlbg 2019-09-18 10:35:42 +02:00 committed by gnzlbg
parent f876c9fac6
commit 128aa330ea

View file

@ -69,6 +69,7 @@ macro_rules! features {
Feature::_last => unreachable!(),
}
}
#[cfg(feature = "std_detect_env_override")]
pub(crate) fn from_str(s: &str) -> Result<Feature, ()> {
match s {
$($feature_lit => Ok(Feature::$feature),)*