Let serde use defaults for LoraCloudModemGeolocationServices.

This lets serde use default values in case a field is missing.
Specifically, this fixes the 'missing field `forward_f_ports`'
if migrating from an older LoRa Cloud configuration where the
`forward_f_ports` field was not yet present.
This commit is contained in:
Orne Brocaar 2023-03-23 10:57:33 +00:00
parent 1f7fcc139d
commit 9ba826963c

View File

@ -201,6 +201,7 @@ pub struct LoraCloudConfiguration {
}
#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(default)]
pub struct LoraCloudModemGeolocationServices {
pub token: String,
pub modem_enabled: bool,