File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
vortex-array/src/optimizer Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ impl ArrayOptimizer for ArrayRef {
2828 Ok ( self . clone ( ) . try_optimize ( ) ?. unwrap_or ( self ) )
2929 }
3030
31+ #[ expect( clippy:: cognitive_complexity) ]
3132 fn try_optimize ( self ) -> VortexResult < Option < ArrayRef > > {
3233 tracing:: debug!(
3334 "Starting root-only array optimization\n {}" ,
Original file line number Diff line number Diff line change @@ -170,9 +170,10 @@ impl<V: VTable> ParentRuleSet<V> {
170170 ) -> & ' static dyn DynArrayParentReduceRule < V > {
171171 // Assert that self is zero-sized
172172 const {
173- if size_of :: < R > ( ) != 0 {
174- panic ! ( "Rule must be zero-sized to be lifted" )
175- }
173+ assert ! (
174+ !( size_of:: <R >( ) != 0 ) ,
175+ "Rule must be zero-sized to be lifted"
176+ ) ;
176177 }
177178 unsafe { & * ( rule as * const R as * const ParentReduceRuleAdapter < V , R > ) }
178179 }
@@ -185,10 +186,10 @@ impl<V: VTable> ParentRuleSet<V> {
185186 child_idx : usize ,
186187 ) -> VortexResult < Option < ArrayRef > > {
187188 for rule in self . rules . iter ( ) {
188- if let MatchKey :: Array ( id) = rule. parent_key ( ) {
189- if parent. encoding_id ( ) != id {
190- continue ;
191- }
189+ if let MatchKey :: Array ( id) = rule. parent_key ( )
190+ && parent. encoding_id ( ) != id
191+ {
192+ continue ;
192193 }
193194 if let Some ( reduced) = rule. reduce_parent ( child, parent, child_idx) ? {
194195 return Ok ( Some ( reduced) ) ;
You can’t perform that action at this time.
0 commit comments