Skip to content

Commit

Permalink
chore: fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vigh-m committed Dec 3, 2024
1 parent 4923183 commit d072a70
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ mod test_reserved_resources_key {
}
}

/// // =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^=
// =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^=

/// KubernetesQuantityValue represents a string that contains a valid kubernetes quantity value.
/// https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Expand Down
4 changes: 2 additions & 2 deletions bottlerocket-settings-models/scalar-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ fn find_inner_field(data_struct: DataStruct, field_name: Option<&str>) -> (Strin
}
Fields::Unnamed(unnamed_field) => {
let field_name = field_name.unwrap_or("0");
return (
(
field_name.to_string(),
typename(
&unnamed_field
Expand All @@ -551,7 +551,7 @@ fn find_inner_field(data_struct: DataStruct, field_name: Option<&str>) -> (Strin
)
.ty,
),
);
)
}
Fields::Unit => {
panic!(
Expand Down
10 changes: 6 additions & 4 deletions bottlerocket-settings-plugin/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ This crate defines the FFI specification for Bottlerocket settings plugins, as w
functions.
*/

// Avoid empty doc comment warning that originates from the StableAbi derive macro.
#![allow(clippy::empty_docs)]
// Avoid false positive improper ctypes warnings for abi_stable's PhantomData markers. We rely on
// the StableAbi trait to catch any real problems.
#![allow(improper_ctypes_definitions)]

#![expect(improper_ctypes_definitions)]
// Avoid warning thrown by StableAbi's definition of non-local `impl`
#![expect(non_local_definitions)]
// Avoid `elide the lifetimes` warnings by clippy. The suggested changes do not make the code more
// readable
#![expect(clippy::needless_lifetimes)]
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use serde_json::Value as JsonValue;
use std::path::PathBuf;
Expand Down

0 comments on commit d072a70

Please sign in to comment.