Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ci errors/warnings #150

Merged
merged 3 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
unconditional_recursion,
unused,
unused_allocation,
Expand Down
12 changes: 8 additions & 4 deletions src/operations/utils_deprecated_primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,14 +464,14 @@ mod tests {
#[test]
fn deprecated_algorithms() {
for algo in get_deprecated_algorithms() {
assert!(is_algorithm_deprecated(algo), "algorithm: {algo:?}");
assert!(is_algorithm_deprecated(algo), "algorithm: {:?}", algo);
}
}

#[test]
fn non_deprecated_algorithms() {
for algo in get_selection_non_deprecated_algorithms() {
assert!(!is_algorithm_deprecated(algo), "algorithm: {algo:?}");
assert!(!is_algorithm_deprecated(algo), "algorithm: {:?}", algo);
}
}

Expand Down Expand Up @@ -517,7 +517,9 @@ mod tests {
for (ktype, ksize) in test_keys {
assert!(
is_key_deprecated(ktype, ksize),
"key: ({ktype:?} : {ksize:?})"
"key: ({:?} : {:?})",
ktype,
ksize
);
}
}
Expand Down Expand Up @@ -569,7 +571,9 @@ mod tests {
for (ktype, ksize) in test_keys {
assert!(
!is_key_deprecated(ktype, ksize),
"key: ({ktype:?} : {ksize:?})"
"key: ({:?} : {:?})",
ktype,
ksize
);
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/requests/common/wire_header_1_0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use arbitrary::Arbitrary;
use bincode::Options;
use log::error;
use serde::{Deserialize, Serialize};
use std::convert::TryFrom;
use std::io::{Read, Write};

const WIRE_PROTOCOL_VERSION_MAJ: u8 = 1;
Expand Down Expand Up @@ -120,7 +119,7 @@ impl WireHeader {
}

let hdr_size = get_from_stream!(stream, u16);
let mut bytes = vec![0_u8; usize::try_from(hdr_size)?];
let mut bytes = vec![0_u8; usize::from(hdr_size)];
stream.read_exact(&mut bytes)?;
if hdr_size != REQUEST_HDR_SIZE {
error!(
Expand Down
2 changes: 1 addition & 1 deletion src/requests/request/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl Request {
return Err(ResponseStatus::BodySizeExceedsLimit);
}
let body = RequestBody::read_from_stream(stream, body_len)?;
let auth = RequestAuth::read_from_stream(stream, usize::try_from(raw_header.auth_len)?)?;
let auth = RequestAuth::read_from_stream(stream, usize::from(raw_header.auth_len))?;

Ok(Request {
header: raw_header.try_into()?,
Expand Down
Loading