Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ enum WriteMode {
DryRun,
}

#[derive(Debug, Clone, clap::ValueEnum)]
#[derive(Debug, Clone, Default, clap::ValueEnum)]
pub enum Format {
#[default]
Yaml,
JsonArray,
JsonK8s,
Expand Down Expand Up @@ -194,11 +195,11 @@ impl App {

fn get_yamls_iter(&self) -> Vec<Value> {
if let Some(files) = &self.files {
return files
files
.iter()
.flat_map(|path| convert_to_yaml(path))
.flatten()
.collect();
.collect()
} else {
let mut yamls = Vec::new();

Expand Down
6 changes: 0 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ pub(crate) struct CliArgs {
pub(crate) format: Format,
}

impl Default for Format {
fn default() -> Self {
Self::Yaml
}
}

impl Display for Format {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Expand Down
Loading