Skip to content

Commit

Permalink
chore(serverless-protocol): fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoreiradj committed Apr 17, 2024
1 parent 9e435c4 commit 95d4bd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/serverless_protocol/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ impl CloudletProtocol {
let message_type = message.message_type as u16;
buffer.push((message.checksum >> 8) as u8);
buffer.push((message.checksum & 0xFF) as u8);
buffer.push((message_type as u16 >> 8) as u8);
buffer.push((message_type as u16 & 0xFF) as u8);
buffer.push((message_type >> 8) as u8);
buffer.push((message_type & 0xFF) as u8);
let json_payload = serde_json::to_string(&message.payload).unwrap();
buffer.extend(json_payload.as_bytes());

Expand Down
6 changes: 6 additions & 0 deletions src/serverless_protocol/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ impl OkMessage {
}
}

impl Default for OkMessage {
fn default() -> Self {
Self::new()
}
}

/// Expects OkMessage
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct LogMessage {
Expand Down

0 comments on commit 95d4bd2

Please sign in to comment.