diff --git a/crates/common/tedge_config/src/tedge_config_cli/models/auto.rs b/crates/common/tedge_config/src/tedge_config_cli/models/auto.rs index 2f8ff2a5cdd..c19b2691a2d 100644 --- a/crates/common/tedge_config/src/tedge_config_cli/models/auto.rs +++ b/crates/common/tedge_config/src/tedge_config_cli/models/auto.rs @@ -17,22 +17,6 @@ pub struct InvalidAutoFlag { input: String, } -impl From for AutoFlag { - fn from(value: bool) -> Self { - if value { - AutoFlag::True - } else { - AutoFlag::False - } - } -} - -impl From<&str> for AutoFlag { - fn from(value: &str) -> Self { - FromStr::from_str(value).unwrap_or(AutoFlag::False) - } -} - impl FromStr for AutoFlag { type Err = InvalidAutoFlag; diff --git a/crates/common/tedge_config/src/tedge_config_cli/tedge_config.rs b/crates/common/tedge_config/src/tedge_config_cli/tedge_config.rs index c822d4b3269..3bf6393702e 100644 --- a/crates/common/tedge_config/src/tedge_config_cli/tedge_config.rs +++ b/crates/common/tedge_config/src/tedge_config_cli/tedge_config.rs @@ -403,7 +403,7 @@ define_tedge_config! { include: { /// Set the bridge local clean session flag (this requires mosquitto >= 2.0.0) #[tedge_config(note = "If set to 'auto', this cleans the local session accordingly the detected version of mosquitto.")] - #[tedge_config(example = "auto", default(value = "auto"))] + #[tedge_config(example = "auto", default(variable = "AutoFlag::Auto"))] local_cleansession: AutoFlag, } },