diff --git a/crates/polars-io/src/json/mod.rs b/crates/polars-io/src/json/mod.rs index d177d3a779a06..7eaea02154498 100644 --- a/crates/polars-io/src/json/mod.rs +++ b/crates/polars-io/src/json/mod.rs @@ -205,11 +205,8 @@ where /// Writes the footer of the Json file. pub fn finish(&mut self) -> PolarsResult<()> { - match self.json_format { - JsonFormat::Json => { - self.write_json_finish()?; - }, - _ => {}, + if JsonFormat::Json == self.json_format { + self.write_json_finish()?; } Ok(()) }