Skip to content

Commit

Permalink
remove unnecessary clones (#224)
Browse files Browse the repository at this point in the history
Signed-off-by: Dirk Rusche <dirk@rusche.me>
  • Loading branch information
DirkRusche committed Apr 19, 2024
1 parent c4a5443 commit 1978ae1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/binding/http/deserializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ impl<'a, T: Headers<'a>> BinaryDeserializer for Deserializer<'a, T> {
.unwrap()?,
)?;

visitor = visitor.set_spec_version(spec_version.clone())?;

let attributes = spec_version.attribute_names();

visitor = visitor.set_spec_version(spec_version)?;

for (hn, hv) in self.headers.iter().filter(|(hn, _)| {
let key = hn.as_str();
SPEC_VERSION_HEADER.ne(key) && key.starts_with("ce-")
Expand Down
4 changes: 2 additions & 2 deletions src/binding/rdkafka/kafka_consumer_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ impl BinaryDeserializer for ConsumerRecordDeserializer {
})?,
)?;

visitor = visitor.set_spec_version(spec_version.clone())?;

let attributes = spec_version.attribute_names();

visitor = visitor.set_spec_version(spec_version)?;

if let Some(hv) = self.headers.remove(CONTENT_TYPE) {
visitor = visitor.set_attribute(
"datacontenttype",
Expand Down

0 comments on commit 1978ae1

Please sign in to comment.