Skip to content

Commit

Permalink
Make Clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
nightkr committed Aug 28, 2024
1 parent 4ce7e8d commit 13a1393
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions rust/operator-binary/src/grpc.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
//! Include gRPC definition files that have been generated by `build.rs`

// tonic does not derive `Eq` for the gRPC message types which causes a warning from Clippy. The
// current suggestion is to explicitly allow the lint in the module that imports the protos, see
// https://github.com/hyperium/tonic/issues/1056
#![allow(clippy::derive_partial_eq_without_eq)]
// CSI docs don't quite align with Rustdoc conventions
#![allow(clippy::doc_lazy_continuation)]

pub static FILE_DESCRIPTOR_SET_BYTES: &[u8] =
include_bytes!(concat!(env!("OUT_DIR"), "/file_descriptor_set.bin"));
Expand Down
5 changes: 2 additions & 3 deletions rust/operator-binary/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,8 @@ pub fn error_full_message(err: &dyn std::error::Error) -> String {
pub async fn trystream_any<S: Stream<Item = Result<bool, E>>, E>(stream: S) -> Result<bool, E> {
pin_mut!(stream);
while let Some(value) = stream.next().await {
match value {
v @ (Ok(true) | Err(_)) => return v,
Ok(false) => {}
if let Ok(true) | Err(_) = value {
return value;
}
}
Ok(false)
Expand Down

0 comments on commit 13a1393

Please sign in to comment.