You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let ewkb = hex_to_vec("01070000000300000001010000000000000000002440000000000000244001010000000000000000003E400000000000003E400102000000020000000000000000002E400000000000002E4000000000000034400000000000003440");
1403
1395
let geom = GeometryCollectionT::<Point>::read_ewkb(&mut ewkb.as_slice()).unwrap();
let ewkb = hex_to_vec("01070000000300000001010000000000000000002440000000000000244001010000000000000000003E400000000000003E400102000000020000000000000000002E400000000000002E4000000000000034400000000000003440");
1435
1427
let geom = GeometryT::<Point>::read_ewkb(&mut ewkb.as_slice()).unwrap();
Copy file name to clipboardExpand all lines: src/postgis.rs
+16-3Lines changed: 16 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
//
4
4
5
5
use types::{Point,LineString,Polygon};
6
-
use ewkb::{self,EwkbRead,EwkbWrite,AsEwkbPoint,AsEwkbLineString,AsEwkbPolygon,AsEwkbMultiPoint,AsEwkbMultiLineString,AsEwkbMultiPolygon,AsEwkbGeometry};
6
+
use ewkb::{self,EwkbRead,EwkbWrite,AsEwkbPoint,AsEwkbLineString,AsEwkbPolygon,AsEwkbMultiPoint,AsEwkbMultiLineString,AsEwkbMultiPolygon,AsEwkbGeometry,AsEwkbGeometryCollection};
7
7
use twkb::{self,TwkbGeom};
8
8
use std::io::Cursor;
9
9
use postgres::types::{Type,IsNull,ToSql,FromSql,BYTEA};
@@ -163,10 +163,10 @@ impl<P> FromSql for ewkb::GeometryT<P>
163
163
accepts_geography!();
164
164
}
165
165
166
-
// NOTE: Implement once for each point type to avoid trait lifetime constraints
166
+
// NOTE: Implement once per point type because AsEwkbPoint<'a> doesn't live long enough for ToSql
0 commit comments