@@ -134,7 +134,11 @@ pub(super) async fn handle_subscribe(
134134 "subscription" : sub_name. 0 ,
135135 "note" : "Run without --dry-run to actually start listening"
136136 } ) ;
137- println ! ( "{}" , serde_json:: to_string_pretty( & result) . context( "Failed to serialize dry-run output" ) ?) ;
137+ println ! (
138+ "{}" ,
139+ serde_json:: to_string_pretty( & result)
140+ . context( "Failed to serialize dry-run output" ) ?
141+ ) ;
138142 return Ok ( ( ) ) ;
139143 }
140144 ( sub_name. 0 . clone ( ) , None , None , false )
@@ -172,7 +176,10 @@ pub(super) async fn handle_subscribe(
172176 eprintln ! ( "Would create Pub/Sub topic: {topic}" ) ;
173177 eprintln ! ( "Would create Pub/Sub subscription: {sub}" ) ;
174178 eprintln ! ( "Would create Workspace Events subscription for target: {target}" ) ;
175- eprintln ! ( "Would listen for event types: {}" , config. event_types. join( ", " ) ) ;
179+ eprintln ! (
180+ "Would listen for event types: {}" ,
181+ config. event_types. join( ", " )
182+ ) ;
176183
177184 let result = json ! ( {
178185 "dry_run" : true ,
@@ -183,15 +190,21 @@ pub(super) async fn handle_subscribe(
183190 "event_types" : config. event_types,
184191 "note" : "Run without --dry-run to actually create subscription"
185192 } ) ;
186- println ! ( "{}" , serde_json:: to_string_pretty( & result) . context( "Failed to serialize dry-run output" ) ?) ;
193+ println ! (
194+ "{}" ,
195+ serde_json:: to_string_pretty( & result)
196+ . context( "Failed to serialize dry-run output" ) ?
197+ ) ;
187198 return Ok ( ( ) ) ;
188199 }
189200
190201 // 1. Create Pub/Sub topic
191202 eprintln ! ( "Creating Pub/Sub topic: {topic}" ) ;
192- let token = pubsub_token
193- . as_ref ( )
194- . ok_or_else ( || GwsError :: Auth ( "Token unavailable in non-dry-run mode. This indicates a bug." . to_string ( ) ) ) ?;
203+ let token = pubsub_token. as_ref ( ) . ok_or_else ( || {
204+ GwsError :: Auth (
205+ "Token unavailable in non-dry-run mode. This indicates a bug." . to_string ( ) ,
206+ )
207+ } ) ?;
195208 let resp = client
196209 . put ( format ! ( "{PUBSUB_API_BASE}/{topic}" ) )
197210 . bearer_auth ( token)
0 commit comments