File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
crates/bevy_ecs/src/world Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -5174,10 +5174,9 @@ mod tests {
5174
5174
5175
5175
fn system ( _: Query < & mut TestComponent > , query : Query < EntityRefExcept < TestComponent > > ) {
5176
5176
for entity_ref in query. iter ( ) {
5177
- assert ! ( matches!(
5178
- entity_ref. get:: <TestComponent2 >( ) ,
5179
- Some ( TestComponent2 ( 0 ) )
5180
- ) ) ;
5177
+ if let Some ( c) = entity_ref. get :: < TestComponent2 > ( ) {
5178
+ assert ! ( c. 0 == 0 ) ;
5179
+ }
5181
5180
}
5182
5181
}
5183
5182
}
@@ -5197,10 +5196,9 @@ mod tests {
5197
5196
assert ! ( entity_mut. get:: <TestComponent >( ) . is_none( ) ) ;
5198
5197
assert ! ( entity_mut. get_ref:: <TestComponent >( ) . is_none( ) ) ;
5199
5198
assert ! ( entity_mut. get_mut:: <TestComponent >( ) . is_none( ) ) ;
5200
- assert ! ( matches!(
5201
- entity_mut. get:: <TestComponent2 >( ) ,
5202
- Some ( TestComponent2 ( 0 ) )
5203
- ) ) ;
5199
+ if let Some ( c) = entity_mut. get :: < TestComponent2 > ( ) {
5200
+ assert ! ( c. 0 == 0 ) ;
5201
+ }
5204
5202
}
5205
5203
5206
5204
assert ! ( found) ;
You can’t perform that action at this time.
0 commit comments