Skip to content

Commit

Permalink
clippy_schema_none
Browse files Browse the repository at this point in the history
  • Loading branch information
deanm0000 committed Sep 19, 2024
1 parent 7092f3b commit 191d9b9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions crates/polars-io/src/json/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,12 @@ where
} else {
simd_json::to_borrowed_value(owned).map_err(to_compute_err)?
};
match &json_value {
BorrowedValue::Array(array) => {
if array.is_empty() {
return Ok(DataFrame::empty());
}
},
_ => {},
if let BorrowedValue::Array(array) = &json_value {
if array.is_empty() & self.schema.is_none() & self.schema_overwrite.is_none() {
return Ok(DataFrame::empty());
}
}

// struct type
let dtype = if let Some(mut schema) = self.schema {
if let Some(overwrite) = self.schema_overwrite {
Expand Down

0 comments on commit 191d9b9

Please sign in to comment.