Skip to content

Commit

Permalink
clippy jsonl
Browse files Browse the repository at this point in the history
  • Loading branch information
jqnatividad committed Dec 25, 2021
1 parent b5bae15 commit 927389b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/jsonl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fn infer_headers(value: &Value) -> Option<Vec<Vec<String>>> {
Some(headers)
}

fn get_value_at_path(value: &Value, path: &Vec<String>) -> Option<Value> {
fn get_value_at_path(value: &Value, path: &[String]) -> Option<Value> {
let mut current = value;

for key in path.iter() {
Expand All @@ -90,7 +90,7 @@ fn get_value_at_path(value: &Value, path: &Vec<String>) -> Option<Value> {
Some(current.to_owned())
}

fn json_line_to_csv_record(value: &Value, headers: &Vec<Vec<String>>) -> csv::StringRecord {
fn json_line_to_csv_record(value: &Value, headers: &[Vec<String>]) -> csv::StringRecord {
let mut record = csv::StringRecord::new();

for path in headers {
Expand Down

0 comments on commit 927389b

Please sign in to comment.