make 128 and add comment
@@ -37,7 +37,7 @@ pub enum UpdateState {
}
pub enum NetworkState {
- SettingsChanged(String<64>),
+ SettingsChanged(String<128>),
Updated,
NoChange,
}
@@ -159,7 +159,8 @@ where
UpdateState::Updated => NetworkState::Updated,
};
- let mut settings_path = String::new();
+ // `settings_path` has to be at least as large as `miniconf::mqtt_client::MAX_TOPIC_LENGTH`.
+ let mut settings_path: String<128> = String::new();
match self.miniconf.handled_update(|path, old, new| {
settings_path.push_str(path).unwrap();
*old = new.clone();
