158158// The proc macro is implemented in soa_derive_internal, and re-exported by this
159159// crate. This is because a single crate can not define both a proc macro and a
160160// macro_rules macro.
161- #[ allow( unused_imports) ]
162- #[ macro_use]
163- extern crate soa_derive_internal;
164- #[ doc( hidden) ]
165- pub use soa_derive_internal:: * ;
161+ pub use soa_derive_internal:: StructOfArray ;
166162
167163/// Create an iterator over multiple fields in a Struct of array style vector.
168164///
@@ -225,7 +221,7 @@ pub use soa_derive_internal::*;
225221macro_rules! soa_zip {
226222 ( $self: expr, [ $( $fields: tt) * ] $( , $external: expr) * $( , ) * ) => { {
227223 let this = $self;
228- soa_zip_impl!( @munch this, { $( $fields) * } -> [ ] $( $external , ) * )
224+ $crate :: soa_zip_impl!( @munch this, { $( $fields) * } -> [ ] $( $external , ) * )
229225 } } ;
230226}
231227
@@ -239,36 +235,36 @@ macro_rules! soa_zip_impl {
239235 } ;
240236 // Eat an element ($_iter) and add it to the current closure. Then recurse
241237 ( @flatten $p: pat => ( $( $tup: tt) * ) , $_iter: expr $( , $tail: expr ) * ) => {
242- soa_zip_impl!( @flatten ( $p, a) => ( $( $tup) * , a ) $( , $tail ) * )
238+ $crate :: soa_zip_impl!( @flatten ( $p, a) => ( $( $tup) * , a ) $( , $tail ) * )
243239 } ;
244240
245241 // The main code is emmited here: we create an iterator, zip it and then
246242 // map the zipped iterator to flatten it
247- ( @final , $first: expr, $( $tail: expr, ) * ) => {
243+ ( @last , $first: expr, $( $tail: expr, ) * ) => {
248244 :: std:: iter:: IntoIterator :: into_iter( $first)
249245 $(
250246 . zip( $tail)
251247 ) *
252248 . map(
253- soa_zip_impl!( @flatten a => ( a) $( , $tail ) * )
249+ $crate :: soa_zip_impl!( @flatten a => ( a) $( , $tail ) * )
254250 )
255251 } ;
256252
257253 // Eat the last `mut $field` and then emit code
258254 ( @munch $self: expr, { mut $field: ident} -> [ $( $output: tt) * ] $( $ext: expr , ) * ) => {
259- soa_zip_impl!( @final $( $output) * , $self. $field. iter_mut( ) , $( $ext, ) * )
255+ $crate :: soa_zip_impl!( @last $( $output) * , $self. $field. iter_mut( ) , $( $ext, ) * )
260256 } ;
261257 // Eat the last `$field` and then emit code
262258 ( @munch $self: expr, { $field: ident} -> [ $( $output: tt) * ] $( $ext: expr , ) * ) => {
263- soa_zip_impl!( @final $( $output) * , $self. $field. iter( ) , $( $ext, ) * )
259+ $crate :: soa_zip_impl!( @last $( $output) * , $self. $field. iter( ) , $( $ext, ) * )
264260 } ;
265261
266262 // Eat the next `mut $field` and then recurse
267263 ( @munch $self: expr, { mut $field: ident, $( $tail: tt) * } -> [ $( $output: tt) * ] $( $ext: expr , ) * ) => {
268- soa_zip_impl!( @munch $self, { $( $tail) * } -> [ $( $output) * , $self. $field. iter_mut( ) ] $( $ext, ) * )
264+ $crate :: soa_zip_impl!( @munch $self, { $( $tail) * } -> [ $( $output) * , $self. $field. iter_mut( ) ] $( $ext, ) * )
269265 } ;
270266 // Eat the next `$field` and then recurse
271267 ( @munch $self: expr, { $field: ident, $( $tail: tt) * } -> [ $( $output: tt) * ] $( $ext: expr , ) * ) => {
272- soa_zip_impl!( @munch $self, { $( $tail) * } -> [ $( $output) * , $self. $field. iter( ) ] $( $ext, ) * )
268+ $crate :: soa_zip_impl!( @munch $self, { $( $tail) * } -> [ $( $output) * , $self. $field. iter( ) ] $( $ext, ) * )
273269 } ;
274270}
0 commit comments