File tree Expand file tree Collapse file tree 1 file changed +17
-14
lines changed
src/test/atlas_planned_maintenance_testing Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change
1
+ // NOTE: Please run a patch against drivers-atlas-testing when making changes within this file. The
2
+ // DRIVER_REPOSITORY and DRIVER_REVISION fields for the Rust axis in drivers-atlas-testing's
3
+ // evergreen config file can be updated to test against your branch.
4
+
1
5
mod json_models;
2
6
3
7
use std:: {
@@ -132,20 +136,19 @@ fn write_json(entities: &mut EntityMap, mut errors: Vec<Bson>) {
132
136
// The events key is expected to be present regardless of whether storeEventsAsEntities was
133
137
// defined.
134
138
write ! ( & mut writer, ",\" events\" :[" ) . unwrap ( ) ;
135
- let event_list_entity = match entities. get ( "events" ) {
136
- Some ( entity) => entity. as_event_list ( ) . to_owned ( ) ,
137
- None => return ,
138
- } ;
139
- let client = entities
140
- . get ( & event_list_entity. client_id )
141
- . unwrap ( )
142
- . as_client ( ) ;
143
- let names: Vec < & str > = event_list_entity
144
- . event_names
145
- . iter ( )
146
- . map ( String :: as_ref)
147
- . collect ( ) ;
148
- client. write_events_list_to_file ( & names, & mut writer) ;
139
+ if let Some ( entity) = entities. get ( "events" ) {
140
+ let event_list_entity = entity. as_event_list ( ) . to_owned ( ) ;
141
+ let client = entities
142
+ . get ( & event_list_entity. client_id )
143
+ . unwrap ( )
144
+ . as_client ( ) ;
145
+ let names: Vec < & str > = event_list_entity
146
+ . event_names
147
+ . iter ( )
148
+ . map ( String :: as_ref)
149
+ . collect ( ) ;
150
+ client. write_events_list_to_file ( & names, & mut writer) ;
151
+ }
149
152
write ! ( & mut writer, "]}}" ) . unwrap ( ) ;
150
153
151
154
let mut results_path = PathBuf :: from ( & path) ;
You can’t perform that action at this time.
0 commit comments