File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -1042,24 +1042,18 @@ mod tests {
10421042 ) ;
10431043 let ( tx, rx) = oneshot:: channel ( ) ;
10441044 let killer = |arg : SpawnArg < Counters > | async move {
1045- match arg {
1046- SpawnArg :: Active ( _) => {
1047- tx. send ( ( ) ) . ok ( ) ;
1048- panic ! ( "Panic to kill the task" ) ;
1049- }
1050- _ => { }
1045+ if let SpawnArg :: Active ( _) = arg {
1046+ tx. send ( ( ) ) . ok ( ) ;
1047+ panic ! ( "Panic to kill the task" ) ;
10511048 }
10521049 } ;
10531050 // spawn a task that kills the entity actor
10541051 manager. spawn ( 1 , killer) . await ?;
10551052 rx. await . expect ( "Failed to receive kill confirmation" ) ;
10561053 let ( tx, rx) = oneshot:: channel ( ) ;
10571054 let counter = |arg : SpawnArg < Counters > | async move {
1058- match arg {
1059- SpawnArg :: Dead => {
1060- tx. send ( ( ) ) . ok ( ) ;
1061- }
1062- _ => { }
1055+ if let SpawnArg :: Dead = arg {
1056+ tx. send ( ( ) ) . ok ( ) ;
10631057 }
10641058 } ;
10651059 // // spawn another task on the - now dead - entity actor
You can’t perform that action at this time.
0 commit comments