Skip to content

Commit 58ad7a9

Browse files
authored
fix(geoparquet): Fix crate publish for 0.4 (#1222)
It's weird but I got ``` Compiling geoparquet v0.4.0 (/Users/kyle/github/geoarrow/geoarrow-rs/target/package/geoparquet-0.4.0) error[E0277]: the trait bound `Arc<dyn GeoArrowArray>: GeoArrowArray` is not satisfied --> src/writer/encode.rs:104:42 | 104 | let covering = bounding_rect(&from_arrow_array(array, field)?)?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `GeoArrowArray` is not implemented for `Arc<dyn GeoArrowArray>` | = help: the following other types implement trait `GeoArrowArray`: GenericWkbArray<O> GenericWktArray<O> GeometryArray GeometryCollectionArray LineStringArray MultiLineStringArray MultiPointArray MultiPolygonArray and 5 others = note: required for the cast from `&Arc<dyn GeoArrowArray>` to `&dyn GeoArrowArray` For more information about this error, try `rustc --explain E0277`. error: could not compile `geoparquet` (lib) due to 1 previous error warning: build failed, waiting for other jobs to finish... ``` only when trying to publish the package. Why wouldn't this error in one of our checks on CI? With this change, `cargo publish -p geoparquet --dry-run` succeeds.
1 parent d3e7431 commit 58ad7a9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rust/geoparquet/src/writer/encode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub(super) fn encode_record_batch(
101101
output_columns[*column_idx] = Some(encoded_column);
102102

103103
if let Some(covering_field_idx) = column_info.covering_field_idx {
104-
let covering = bounding_rect(&from_arrow_array(array, field)?)?;
104+
let covering = bounding_rect(from_arrow_array(array, field)?.as_ref())?;
105105
output_columns[covering_field_idx] = Some(covering.into_array_ref());
106106
}
107107

0 commit comments

Comments
 (0)