Skip to content

Commit e17e9e4

Browse files
authored
chore: Clippy updates (#1415)
Fix new lints from latest clippy version. Should unblock #1411
1 parent a67494a commit e17e9e4

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

rust/geoarrow-expr-geo/src/util/downcast.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,8 +1171,6 @@ mod tests {
11711171
use geoarrow_array::GeoArrowArray;
11721172
use geoarrow_schema::error::GeoArrowResult;
11731173

1174-
use super::*;
1175-
11761174
// Ensure macro gets called, so an error will appear to ensure exhaustiveness
11771175
#[allow(dead_code)]
11781176
fn _test_two_args_macro_exhaustiveness(

rust/geoarrow-geojson/src/writer/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,9 @@ fn transform_batch(batch: &RecordBatch) -> Result<RecordBatch, ArrowError> {
200200

201201
// Check if this is a geometry column by looking for GeoArrow extension metadata
202202
if GeoArrowType::from_extension_field(field).is_ok() {
203-
if geometry_field_index.is_some() {
203+
if let Some(geometry_field_index) = geometry_field_index {
204204
return Err(ArrowError::InvalidArgumentError(format!(
205-
"Multiple geometry columns found in positions {} and {i}. GeoJSON requires exactly one geometry column.",
206-
geometry_field_index.unwrap()
205+
"Multiple geometry columns found in positions {geometry_field_index} and {i}. GeoJSON requires exactly one geometry column."
207206
)));
208207
}
209208
geometry_field_index = Some(i);

0 commit comments

Comments
 (0)