@@ -341,7 +341,7 @@ pub fn derive_mut(input: &Input) -> TokenStream {
341
341
nested_ord. push ( quote ! { for <' b> #ref_name<' b>: Ord } ) ;
342
342
343
343
let apply_permutation = input. map_fields_nested_or (
344
- |ident, _| quote ! { self . #ident. apply_permutation ( permutation) } ,
344
+ |ident, _| quote ! { self . #ident. __private_apply_permutation ( permutation) } ,
345
345
|ident, _| quote ! { permutation. apply_slice_in_place( & mut self . #ident) } ,
346
346
) . collect :: < Vec < _ > > ( ) ;
347
347
@@ -616,7 +616,9 @@ pub fn derive_mut(input: &Input) -> TokenStream {
616
616
}
617
617
618
618
#[ doc( hidden) ]
619
- fn apply_permutation( & mut self , permutation: & mut soa_derive:: Permutation ) {
619
+ /// This is `pub` due to there will be compile-error if `#[nested_soa]` is used.
620
+ /// Do not use this method directly.
621
+ pub fn __private_apply_permutation( & mut self , permutation: & mut soa_derive:: Permutation ) {
620
622
#( #apply_permutation; ) *
621
623
}
622
624
@@ -633,7 +635,7 @@ pub fn derive_mut(input: &Input) -> TokenStream {
633
635
permutation. sort_by( |j, k| f( self . index( * j) , self . index( * k) ) ) ;
634
636
635
637
let mut permutation = Permutation :: oneline( permutation) . inverse( ) ;
636
- self . apply_permutation ( & mut permutation) ;
638
+ self . __private_apply_permutation ( & mut permutation) ;
637
639
}
638
640
639
641
/// Similar to [`&mut
@@ -650,7 +652,7 @@ pub fn derive_mut(input: &Input) -> TokenStream {
650
652
permutation. sort_by_key( |i| f( self . index( * i) ) ) ;
651
653
652
654
let mut permutation = Permutation :: oneline( permutation) . inverse( ) ;
653
- self . apply_permutation ( & mut permutation) ;
655
+ self . __private_apply_permutation ( & mut permutation) ;
654
656
}
655
657
}
656
658
@@ -669,7 +671,7 @@ pub fn derive_mut(input: &Input) -> TokenStream {
669
671
permutation. sort_by_key( |i| self . index( * i) ) ;
670
672
671
673
let mut permutation = Permutation :: oneline( permutation) . inverse( ) ;
672
- self . apply_permutation ( & mut permutation) ;
674
+ self . __private_apply_permutation ( & mut permutation) ;
673
675
}
674
676
}
675
677
} ;
0 commit comments