Commit 9fa1615 1 parent 0d882cb commit 9fa1615 Copy full SHA for 9fa1615
File tree 2 files changed +4
-6
lines changed
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ writer.write(&kml).unwrap();
66
66
67
67
``` rust
68
68
use geo_types :: {self , GeometryCollection };
69
- use kml :: {quick_collection, Kml , types :: Point };
69
+ use kml :: {Kml , types :: Point };
70
70
71
71
let kml_point = Point :: new (1 . , 1 . , None );
72
72
// Convert into geo_types primitives
@@ -87,8 +87,7 @@ let kml_folder_str = r#"
87
87
</Folder>" # ;
88
88
let kml_folder : Kml <f64 > = kml_folder_str . parse (). unwrap ();
89
89
90
- // Use the quick_collection helper to convert Kml to a geo_types::GeometryCollection
91
- let geom_coll : GeometryCollection <f64 > = quick_collection (kml_folder ). unwrap ();
90
+ let geom_coll : GeometryCollection <f64 > = kml_folder . try_into (). unwrap ();
92
91
```
93
92
94
93
## Code of Conduct
Original file line number Diff line number Diff line change 67
67
//! ```
68
68
//! # #[cfg(feature = "geo-types")] {
69
69
//! use geo_types::{self, GeometryCollection};
70
- //! use kml::{quick_collection, Kml, types::Point};
70
+ //! use kml::{Kml, types::Point};
71
71
//!
72
72
//! let kml_point = Point::new(1., 1., None);
73
73
//! // Convert into geo_types primitives
88
88
//! </Folder>"#;
89
89
//! let kml_folder: Kml<f64> = kml_folder_str.parse().unwrap();
90
90
//!
91
- //! // Use the quick_collection helper to convert Kml to a geo_types::GeometryCollection
92
- //! let geom_coll: GeometryCollection<f64> = quick_collection(kml_folder).unwrap();
91
+ //! let geom_coll: GeometryCollection<f64> = kml_folder.try_into().unwrap();
93
92
//! # }
94
93
//! ```
95
94
You can’t perform that action at this time.
0 commit comments