File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -131,10 +131,7 @@ pub struct WithTargetUnitTrace {
131131
132132impl WithTargetUnitTrace {
133133 fn add_unit_id ( & mut self , target : & str , unit_id : & str ) {
134- let unit_ids = self
135- . unit_ids_applied_by_key
136- . entry ( target. to_string ( ) )
137- . or_insert_with ( LinkedHashSet :: new) ;
134+ let unit_ids = self . unit_ids_applied_by_key . entry ( target. to_string ( ) ) . or_default ( ) ;
138135 unit_ids. insert ( unit_id. to_string ( ) ) ;
139136 }
140137
Original file line number Diff line number Diff line change @@ -241,7 +241,15 @@ impl ImpactOutput {
241241 ' outer: for i in 1 ..=max_hops {
242242 let new_example = example. with_url ( current_url. clone ( ) ) . with_method ( Some ( current_method. clone ( ) ) ) ;
243243
244- let request = Request :: from_example ( & router. config , & new_example) . unwrap ( ) ;
244+ let request = match Request :: from_example ( & router. config , & new_example) {
245+ Ok ( request) => request,
246+ Err ( err) => {
247+ log:: warn!( "cannot create request from new target: {:?} : {}" , new_example, err) ;
248+
249+ break ;
250+ }
251+ } ;
252+
245253 let routes = router. match_request ( & request) ;
246254 let mut action = Action :: from_routes_rule ( routes, & request, None ) ;
247255
You can’t perform that action at this time.
0 commit comments