Applied clippy rules

This commit is contained in:
2023-04-10 01:29:48 +02:00
parent 7d5ce71e5b
commit 839c0a1c57
17 changed files with 139 additions and 53 deletions

View File

@@ -24,6 +24,12 @@ impl Payload {
}
}
impl Default for Payload {
fn default() -> Self {
Self::new()
}
}
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Command {
@@ -78,8 +84,7 @@ mod tests {
fn serialize() {
let mut execute_resp = Payload::new();
let mut state = State::default();
state.on = Some(true);
let state = State { on: Some(true) };
let mut command = Command::new(Status::Success);
command.states = Some(States {
online: true,

View File

@@ -24,6 +24,12 @@ impl Payload {
}
}
impl Default for Payload {
fn default() -> Self {
Self::new()
}
}
#[derive(Debug, Serialize)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum Status {
@@ -64,6 +70,12 @@ impl Device {
}
}
impl Default for Device {
fn default() -> Self {
Self::new()
}
}
#[cfg(test)]
mod tests {
use super::*;