Skip to content

Commit

Permalink
refactor: fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeStanger committed Jun 15, 2023
1 parent 0ec37d8 commit 42fa830
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions corn-cli/src/bin/corn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn main() {
let output_type = get_output_type(args.output_type);

match parse(&unparsed_file) {
Ok(config) => match serialize(config, output_type) {
Ok(config) => match serialize(&config, output_type) {
Ok(serialized) => println!("{serialized}"),
Err(err) => handle_err(&err),
},
Expand Down Expand Up @@ -71,7 +71,7 @@ fn get_output_type(arg: Option<OutputType>) -> OutputType {
OutputType::Json
}

fn serialize(config: Value, output_type: OutputType) -> Result<String, Error> {
fn serialize(config: &Value, output_type: OutputType) -> Result<String, Error> {
match output_type {
OutputType::Json => serde_json::to_string_pretty(&config).map_err(Error::from),
OutputType::Yaml => serde_yaml::to_string(&config).map_err(Error::from),
Expand Down

0 comments on commit 42fa830

Please sign in to comment.