File tree Expand file tree Collapse file tree 3 files changed +11
-18
lines changed Expand file tree Collapse file tree 3 files changed +11
-18
lines changed Original file line number Diff line number Diff line change @@ -154,8 +154,6 @@ pub mod _alloc {
154
154
//! Needed to access these types from `alloc` in macros when the std feature is
155
155
//! disabled and the calling context is missing `extern crate alloc`. These are
156
156
//! _not_ meant for public use.
157
-
158
- pub use :: alloc:: boxed:: Box ;
159
157
pub use :: alloc:: vec;
160
158
}
161
159
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ macro_rules! coord {
123
123
/// [`LineString`]: ./line_string/struct.LineString.html
124
124
#[ macro_export]
125
125
macro_rules! line_string {
126
- ( ) => { $crate:: LineString :: new( vec![ ] ) } ;
126
+ ( ) => { $crate:: LineString :: new( $crate :: _alloc :: vec![ ] ) } ;
127
127
(
128
128
$( ( $( $tag: tt : $val: expr) ,* $( , ) ? ) ) ,*
129
129
$( , ) ?
@@ -139,11 +139,9 @@ macro_rules! line_string {
139
139
$( , ) ?
140
140
) => {
141
141
$crate:: LineString :: new(
142
- <[ _] >:: into_vec(
143
- $crate:: _alloc:: Box :: new(
144
- [ $( $coord) , * ]
145
- )
146
- )
142
+ $crate:: _alloc:: vec![
143
+ $( $coord) ,*
144
+ ]
147
145
)
148
146
} ;
149
147
}
@@ -216,7 +214,7 @@ macro_rules! line_string {
216
214
/// [`Polygon`]: ./struct.Polygon.html
217
215
#[ macro_export]
218
216
macro_rules! polygon {
219
- ( ) => { $crate:: Polygon :: new( $crate:: line_string![ ] , vec![ ] ) } ;
217
+ ( ) => { $crate:: Polygon :: new( $crate:: line_string![ ] , $crate :: _alloc :: vec![ ] ) } ;
220
218
(
221
219
exterior: [
222
220
$( ( $( $exterior_tag: tt : $exterior_val: expr) ,* $( , ) ? ) ) ,*
@@ -262,15 +260,11 @@ macro_rules! polygon {
262
260
$crate:: line_string![
263
261
$( $exterior_coord) , *
264
262
] ,
265
- <[ _] >:: into_vec(
266
- $crate:: _alloc:: Box :: new(
267
- [
268
- $(
269
- $crate:: line_string![ $( $interior_coord) ,* ]
270
- ) , *
271
- ]
272
- )
273
- )
263
+ $crate:: _alloc:: vec![
264
+ $(
265
+ $crate:: line_string![ $( $interior_coord) ,* ]
266
+ ) , *
267
+ ]
274
268
)
275
269
} ;
276
270
(
Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ macro_rules! wkt_internal {
141
141
#[ cfg( test) ]
142
142
mod test {
143
143
use crate :: geometry:: * ;
144
+ use alloc:: vec;
144
145
145
146
#[ test]
146
147
fn point ( ) {
You can’t perform that action at this time.
0 commit comments