Skip to content

Commit

Permalink
Fix warnings introduced by the Rust 1.71 upgrade (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
nightkr authored Aug 1, 2023
1 parent 49c68aa commit c1ef41e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rust/crd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ use stackable_operator::{
status::condition::{ClusterCondition, HasStatusCondition},
};
use std::collections::BTreeMap;
use std::ops::Deref;
use strum::{Display, EnumIter, EnumString, IntoEnumIterator};

pub const AIRFLOW_UID: i64 = 1000;
Expand Down Expand Up @@ -351,12 +350,12 @@ impl AirflowCluster {
/// this will extract a `Vec<Volume>` from `Option<Vec<Volume>>`
pub fn volumes(&self) -> Vec<Volume> {
let tmp = self.spec.cluster_config.volumes.as_ref();
tmp.iter().flat_map(|v| v.deref().clone()).collect()
tmp.iter().flat_map(|v| (*v).clone()).collect()
}

pub fn volume_mounts(&self) -> Vec<VolumeMount> {
let tmp = self.spec.cluster_config.volume_mounts.as_ref();
let mut mounts: Vec<VolumeMount> = tmp.iter().flat_map(|v| v.deref().clone()).collect();
let mut mounts: Vec<VolumeMount> = tmp.iter().flat_map(|v| (*v).clone()).collect();
if self.git_sync().is_some() {
mounts.push(VolumeMount {
name: GIT_CONTENT.into(),
Expand Down

0 comments on commit c1ef41e

Please sign in to comment.