Skip to content

Commit 8fd11f8

Browse files
committed
chore: Fix clippy lints
1 parent db3f0e0 commit 8fd11f8

5 files changed

Lines changed: 10 additions & 3 deletions

File tree

rust/operator-binary/src/backend/cert_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub enum Error {
7070
impl SecretBackendError for Error {
7171
fn grpc_code(&self) -> tonic::Code {
7272
match self {
73-
Error::NoPvcName { .. } => tonic::Code::FailedPrecondition,
73+
Error::NoPvcName => tonic::Code::FailedPrecondition,
7474
Error::ScopeAddresses { .. } => tonic::Code::Unavailable,
7575
Error::GetSecret { .. } => tonic::Code::Unavailable,
7676
Error::GetCertManagerCertificate { .. } => tonic::Code::Unavailable,

rust/operator-binary/src/backend/dynamic.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ pub enum FromSelectorError {
190190

191191
#[snafu(display("failed to initialize backend for {class}"))]
192192
FromClass {
193-
source: FromClassError,
193+
#[snafu(source(from(FromClassError, Box::new)))]
194+
source: Box<FromClassError>,
194195
class: ObjectRef<SecretClass>,
195196
},
196197
}

rust/operator-binary/src/backend/tls/ca.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl SecretBackendError for Error {
133133
Error::BuildCertificate { .. } => tonic::Code::FailedPrecondition,
134134
Error::SerializeCertificate { .. } => tonic::Code::FailedPrecondition,
135135
Error::SaveCaCertificate { .. } => tonic::Code::Unavailable,
136-
Error::SaveRequestedButForbidden { .. } => tonic::Code::FailedPrecondition,
136+
Error::SaveRequestedButForbidden => tonic::Code::FailedPrecondition,
137137
}
138138
}
139139

rust/operator-binary/src/grpc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
pub static FILE_DESCRIPTOR_SET_BYTES: &[u8] =
77
include_bytes!(concat!(env!("OUT_DIR"), "/file_descriptor_set.bin"));
88

9+
// The prost-generated code breaks many clippy lints. Just disable them since there's nothing we can do about it.
10+
#[allow(clippy::all)]
911
pub mod csi {
1012
pub mod v1 {
1113
tonic::include_proto!("csi.v1");

rust/operator-binary/src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// TODO: Look into how to properly resolve `clippy::result_large_err`.
2+
// This will need changes in our and upstream error types.
3+
#![allow(clippy::result_large_err)]
4+
15
use std::{os::unix::prelude::FileTypeExt, path::PathBuf, pin::pin};
26

37
use anyhow::Context;

0 commit comments

Comments
 (0)