File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -301,10 +301,10 @@ impl SourceShutdownCoordinator {
301
301
) -> impl Future < Output = bool > {
302
302
async move {
303
303
let fut = shutdown_complete_tripwire. then ( tripwire_handler) ;
304
- if deadline . is_some ( ) {
304
+ if let Some ( deadline ) = deadline {
305
305
// Call `shutdown_force_trigger.disable()` on drop.
306
306
let shutdown_force_trigger = DisabledTrigger :: new ( shutdown_force_trigger) ;
307
- if timeout_at ( deadline. unwrap ( ) , fut) . await . is_ok ( ) {
307
+ if timeout_at ( deadline, fut) . await . is_ok ( ) {
308
308
shutdown_force_trigger. into_inner ( ) . disable ( ) ;
309
309
true
310
310
} else {
Original file line number Diff line number Diff line change @@ -130,13 +130,13 @@ impl RunningTopology {
130
130
. graceful_shutdown_duration
131
131
. map ( |grace_period| Instant :: now ( ) + grace_period) ;
132
132
133
- let timeout = if deadline . is_some ( ) {
133
+ let timeout = if let Some ( deadline ) = deadline {
134
134
// If we reach the deadline, this future will print out which components
135
135
// won't gracefully shutdown since we will start to forcefully shutdown
136
136
// the sources.
137
137
let mut check_handles2 = check_handles. clone ( ) ;
138
138
Box :: pin ( async move {
139
- sleep_until ( deadline. unwrap ( ) ) . await ;
139
+ sleep_until ( deadline) . await ;
140
140
// Remove all tasks that have shutdown.
141
141
check_handles2. retain ( |_key, handles| {
142
142
retain ( handles, |handle| handle. peek ( ) . is_none ( ) ) ;
You can’t perform that action at this time.
0 commit comments