Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
lewiszlw committed Mar 13, 2024
1 parent 9521855 commit 882bd5d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/geo/box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,24 +98,24 @@ impl From<geo::Rect> for Box2d {
}

#[cfg(feature = "geos")]
impl TryFrom<geos::Geometry> for Box2d {
impl TryFrom<geos::Geometry<'_>> for Box2d {
type Error = DataFusionError;

fn try_from(value: geos::Geometry) -> Result<Self, Self::Error> {
use datafusion_common::internal_datafusion_err;
use geos::Geom;
let xmin = value
.get_x_min()
.map_err(internal_datafusion_err!("geom get_x_min failed"))?;
.map_err(|_| internal_datafusion_err!("geom get_x_min failed"))?;
let ymin = value
.get_y_min()
.map_err(internal_datafusion_err!("geom get_y_min failed"))?;
.map_err(|_| internal_datafusion_err!("geom get_y_min failed"))?;
let xmax = value
.get_x_max()
.map_err(internal_datafusion_err!("geom get_x_max failed"))?;
.map_err(|_| internal_datafusion_err!("geom get_x_max failed"))?;
let ymax = value
.get_y_max()
.map_err(internal_datafusion_err!("geom get_y_max failed"))?;
.map_err(|_| internal_datafusion_err!("geom get_y_max failed"))?;
Ok(Box2d {
xmin,
ymin,
Expand Down

0 comments on commit 882bd5d

Please sign in to comment.