Skip to content

Commit b5f9262

Browse files
committed
chore: Fix clippy lints
1 parent 4e7b97a commit b5f9262

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

  • crates
    • stackable-operator/src
    • stackable-versioned-macros/src/attrs

crates/stackable-operator/src/product_logging/spec.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,10 @@ pub struct AutomaticContainerLogConfig {
234234

235235
impl Merge for AutomaticContainerLogConfigFragment {
236236
fn merge(&mut self, defaults: &Self) {
237-
self.loggers.merge(&defaults.loggers);
237+
// The fully qualified syntax is used here because BTreeMaps also have a merge function.
238+
// See https://github.com/rust-lang/rust/issues/48919
239+
Merge::merge(&mut self.loggers, &defaults.loggers);
240+
238241
if let Some(console) = &mut self.console {
239242
if let Some(defaults_console) = &defaults.console {
240243
console.merge(defaults_console);

crates/stackable-operator/src/status/condition/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,11 +313,7 @@ impl ClusterConditionSet {
313313
let mut result = Self::new();
314314

315315
// Combine the two condition vectors of old and new `ClusterConditionSet`.
316-
for (old_condition, new_condition) in self
317-
.conditions
318-
.into_iter()
319-
.zip(other.conditions.into_iter())
320-
{
316+
for (old_condition, new_condition) in self.conditions.into_iter().zip(other.conditions) {
321317
if let Some(condition) = match (old_condition, new_condition) {
322318
// If both are set use the `condition_combiner` to update timestamps or concatenate
323319
// the message

crates/stackable-versioned-macros/src/attrs/module.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl ModuleAttributes {
4141

4242
// It needs to be sorted, even though the definition could be unsorted
4343
// (if allow_unsorted is set).
44-
self.versions.sort_by(|lhs, rhs| lhs.name.cmp(&rhs.name));
44+
self.versions.sort_by_key(|lhs| lhs.name);
4545

4646
if !self.options.common.allow_unsorted.is_present() && !is_sorted {
4747
let versions = self.versions.iter().map(|v| v.name).join(", ");

0 commit comments

Comments
 (0)