Skip to content

Commit

Permalink
fix: lints
Browse files Browse the repository at this point in the history
  • Loading branch information
wyfo committed Sep 25, 2024
1 parent 757e262 commit 4d238f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/examples/z_bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ fn main() {
let input2 = ZBytes::from([2, 3]);
let mut zbytes = ZBytes::new();
let mut writer = zbytes.writer();
writer.write(&[0u8, 1]).unwrap();
writer.write_all(&[0u8, 1]).unwrap();
writer.append(input2.clone());
assert_eq!(*zbytes.to_bytes(), [0u8, 1, 2, 3]);
let mut reader = zbytes.reader();
let mut buf = [0; 2];
reader.read(&mut buf).unwrap();
reader.read_exact(&mut buf).unwrap();
assert_eq!(buf, *input1);
reader.read(&mut buf).unwrap();
reader.read_exact(&mut buf).unwrap();
assert_eq!(buf, *input2.to_bytes());
}
2 changes: 1 addition & 1 deletion plugins/zenoh-plugin-rest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ fn payload_to_json(payload: &ZBytes, encoding: &Encoding) -> serde_json::Value {
tracing::warn!(
"Encoding is String but data is not String, converting to base64, Error: {e:?}"
);
base64_encode(&e.as_bytes())
base64_encode(e.as_bytes())
}),
),
// otherwise convert to JSON string
Expand Down

0 comments on commit 4d238f9

Please sign in to comment.