Skip to content

Commit

Permalink
Remove unnecessary clone during RetainedMessage creation (#1409)
Browse files Browse the repository at this point in the history
  • Loading branch information
hubcio authored Dec 31, 2024
1 parent 68fe698 commit 8f53b60
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "server"
version = "0.4.93"
version = "0.4.94"
edition = "2021"
build = "src/build.rs"

Expand Down
4 changes: 2 additions & 2 deletions server/src/streaming/models/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ impl RetainedMessage {
checksum: checksum::calculate(&message.payload),
message_state: MessageState::Available,
id: message.id,
payload: message.payload.clone(),
headers: message.headers.as_ref().map(|headers| headers.to_bytes()),
payload: message.payload,
headers: message.headers.map(|h| h.to_bytes()),
}
}

Expand Down

0 comments on commit 8f53b60

Please sign in to comment.