@@ -247,10 +247,7 @@ impl LaunchPlan {
247247 }
248248 }
249249
250- pub fn require_backend_features (
251- & mut self ,
252- features : impl IntoIterator < Item = BackendFeature > ,
253- ) {
250+ pub fn require_backend_features ( & mut self , features : impl IntoIterator < Item = BackendFeature > ) {
254251 for feature in features {
255252 self . require_backend_feature ( feature) ;
256253 }
@@ -412,11 +409,7 @@ pub trait LifecycleExtension: std::fmt::Debug + Send + Sync {
412409 ///
413410 /// Invoked in reverse registration order. Errors are logged but do not
414411 /// propagate.
415- async fn after_delete (
416- & self ,
417- _sandbox : & Sandbox ,
418- _state_dir : & Path ,
419- ) -> LifecycleResult < ( ) > {
412+ async fn after_delete ( & self , _sandbox : & Sandbox , _state_dir : & Path ) -> LifecycleResult < ( ) > {
420413 Ok ( ( ) )
421414 }
422415
@@ -426,10 +419,7 @@ pub trait LifecycleExtension: std::fmt::Debug + Send + Sync {
426419 /// Returning an error causes the driver to skip restoring this
427420 /// sandbox; the persisted state is left on disk for operator
428421 /// inspection.
429- async fn before_restore (
430- & self ,
431- _sandbox : & RestoreContext ,
432- ) -> LifecycleResult < ( ) > {
422+ async fn before_restore ( & self , _sandbox : & RestoreContext ) -> LifecycleResult < ( ) > {
433423 Ok ( ( ) )
434424 }
435425
@@ -439,10 +429,7 @@ pub trait LifecycleExtension: std::fmt::Debug + Send + Sync {
439429 /// Only invoked when restore succeeds. If the restore fails partway
440430 /// through, [`after_launch_failed`](Self::after_launch_failed)
441431 /// runs instead.
442- async fn after_restore (
443- & self ,
444- _sandbox : & RestoreContext ,
445- ) -> LifecycleResult < ( ) > {
432+ async fn after_restore ( & self , _sandbox : & RestoreContext ) -> LifecycleResult < ( ) > {
446433 Ok ( ( ) )
447434 }
448435}
@@ -558,9 +545,7 @@ impl LifecycleExtensionRegistry {
558545 . iter ( )
559546 . filter ( |ext| match ext. activation ( ) {
560547 ExtensionActivation :: Global => true ,
561- ExtensionActivation :: OnRequest { key } => {
562- sandbox_requested_extension ( sandbox, key)
563- }
548+ ExtensionActivation :: OnRequest { key } => sandbox_requested_extension ( sandbox, key) ,
564549 } )
565550 . collect ( )
566551 }
@@ -649,10 +634,7 @@ impl LifecycleExtensionRegistry {
649634 }
650635 }
651636
652- pub async fn before_restore (
653- & self ,
654- sandbox : & RestoreContext ,
655- ) -> LifecycleResult < ( ) > {
637+ pub async fn before_restore ( & self , sandbox : & RestoreContext ) -> LifecycleResult < ( ) > {
656638 for ext in self . active_for ( & sandbox. sandbox ) {
657639 ext. before_restore ( sandbox) . await ?;
658640 }
@@ -752,9 +734,7 @@ fn validate_extension_name(name: &str) -> LifecycleResult<()> {
752734 Ok ( ( ) )
753735}
754736
755- fn validate_descriptor_strings (
756- descriptor : & ExtensionDescriptor ,
757- ) -> LifecycleResult < ( ) > {
737+ fn validate_descriptor_strings ( descriptor : & ExtensionDescriptor ) -> LifecycleResult < ( ) > {
758738 for value in descriptor
759739 . provides
760740 . kernel_profiles
@@ -932,11 +912,7 @@ mod tests {
932912 Ok ( ( ) )
933913 }
934914
935- async fn after_delete (
936- & self ,
937- _sandbox : & Sandbox ,
938- _state_dir : & Path ,
939- ) -> LifecycleResult < ( ) > {
915+ async fn after_delete ( & self , _sandbox : & Sandbox , _state_dir : & Path ) -> LifecycleResult < ( ) > {
940916 self . calls
941917 . lock ( )
942918 . unwrap ( )
@@ -1040,10 +1016,7 @@ mod tests {
10401016 . configure_launch ( & sandbox, & PathBuf :: from ( "/tmp/state" ) , & mut plan)
10411017 . await
10421018 . expect_err ( "scripted failure should propagate" ) ;
1043- assert ! (
1044- err. message( )
1045- . contains( "scripted configure_launch failure" )
1046- ) ;
1019+ assert ! ( err. message( ) . contains( "scripted configure_launch failure" ) ) ;
10471020
10481021 assert_eq ! ( ext_a. calls( ) , vec![ "a:configure_launch" ] ) ;
10491022 assert_eq ! ( ext_fail. calls( ) , vec![ "boom:configure_launch" ] ) ;
0 commit comments