diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 16 |
1 files changed, 1 insertions, 15 deletions
| @@ -346,6 +346,7 @@ pub struct DeviceConfig { | |||
| 346 | pub model: &'static str, | 346 | pub model: &'static str, |
| 347 | } | 347 | } |
| 348 | 348 | ||
| 349 | #[derive(Default)] | ||
| 349 | pub struct DeviceBuffersOwned { | 350 | pub struct DeviceBuffersOwned { |
| 350 | pub publish: Vec<u8, 2048>, | 351 | pub publish: Vec<u8, 2048>, |
| 351 | pub subscribe: Vec<u8, 128>, | 352 | pub subscribe: Vec<u8, 128>, |
| @@ -357,21 +358,6 @@ pub struct DeviceBuffersOwned { | |||
| 357 | pub attributes_topic: String<128>, | 358 | pub attributes_topic: String<128>, |
| 358 | } | 359 | } |
| 359 | 360 | ||
| 360 | impl Default for DeviceBuffersOwned { | ||
| 361 | fn default() -> Self { | ||
| 362 | Self { | ||
| 363 | publish: Default::default(), | ||
| 364 | subscribe: Default::default(), | ||
| 365 | discovery: Default::default(), | ||
| 366 | availability_topic: Default::default(), | ||
| 367 | discovery_topic: Default::default(), | ||
| 368 | state_topic: Default::default(), | ||
| 369 | command_topic: Default::default(), | ||
| 370 | attributes_topic: Default::default(), | ||
| 371 | } | ||
| 372 | } | ||
| 373 | } | ||
| 374 | |||
| 375 | impl DeviceBuffersOwned { | 361 | impl DeviceBuffersOwned { |
| 376 | pub fn as_buffers_mut(&mut self) -> DeviceBuffers<'_> { | 362 | pub fn as_buffers_mut(&mut self) -> DeviceBuffers<'_> { |
| 377 | DeviceBuffers { | 363 | DeviceBuffers { |
