@@ -5,8 +5,8 @@ use std::sync::Arc;
55use anyhow:: { Context , Result } ;
66use async_trait:: async_trait;
77use forge_app:: {
8- CommandInfra , EnvironmentInfra , FileReaderInfra , SyncProgressCounter ,
9- WalkerInfra , WorkspaceService , WorkspaceStatus , compute_hash,
8+ CommandInfra , EnvironmentInfra , FileReaderInfra , SyncProgressCounter , WalkerInfra ,
9+ WorkspaceService , WorkspaceStatus , compute_hash,
1010} ;
1111use forge_domain:: {
1212 AuthCredential , AuthDetails , FileHash , FileNode , ProviderId , ProviderRepository , SyncProgress ,
9696 user_id : & UserId ,
9797 workspace_id : & WorkspaceId ,
9898 auth_token : & forge_domain:: ApiKey ,
99- ) -> anyhow:: Result < Vec < FileHash > >
100- {
99+ ) -> anyhow:: Result < Vec < FileHash > > {
101100 info ! ( workspace_id = %workspace_id, "Fetching existing file hashes from server to detect changes..." ) ;
102101 let workspace_files =
103102 forge_domain:: CodeBase :: new ( user_id. clone ( ) , workspace_id. clone ( ) , ( ) ) ;
@@ -116,8 +115,7 @@ impl<
116115 workspace_id : & WorkspaceId ,
117116 token : & forge_domain:: ApiKey ,
118117 files_to_delete : Vec < String > ,
119- ) -> Result < usize >
120- {
118+ ) -> Result < usize > {
121119 if files_to_delete. is_empty ( ) {
122120 return Ok ( 0 ) ;
123121 }
@@ -150,8 +148,7 @@ impl<
150148 token : & forge_domain:: ApiKey ,
151149 files : Vec < forge_domain:: FileNode > ,
152150 batch_size : usize ,
153- ) -> impl Stream < Item = Result < usize , anyhow:: Error > > + Send
154- {
151+ ) -> impl Stream < Item = Result < usize , anyhow:: Error > > + Send {
155152 let user_id = user_id. clone ( ) ;
156153 let workspace_id = workspace_id. clone ( ) ;
157154 let token = token. clone ( ) ;
@@ -336,8 +333,7 @@ impl<
336333 /// # Errors
337334 /// Returns an error if the credential is not found, if there's a database
338335 /// error, or if the credential format is invalid
339- async fn get_workspace_credentials ( & self ) -> Result < ( forge_domain:: ApiKey , UserId ) >
340- {
336+ async fn get_workspace_credentials ( & self ) -> Result < ( forge_domain:: ApiKey , UserId ) > {
341337 let credential = self
342338 . infra
343339 . get_credential ( & ProviderId :: FORGE_SERVICES )
@@ -376,8 +372,7 @@ impl<
376372 & self ,
377373 path : PathBuf ,
378374 token : & forge_domain:: ApiKey ,
379- ) -> Result < Option < forge_domain:: WorkspaceInfo > >
380- {
375+ ) -> Result < Option < forge_domain:: WorkspaceInfo > > {
381376 let canonical_path = canonicalize_path ( path) ?;
382377
383378 // Get all workspaces from remote server
@@ -419,8 +414,7 @@ impl<
419414 & self ,
420415 path : PathBuf ,
421416 token : & forge_domain:: ApiKey ,
422- ) -> Result < forge_domain:: WorkspaceInfo >
423- {
417+ ) -> Result < forge_domain:: WorkspaceInfo > {
424418 self . find_workspace_by_path ( path, token)
425419 . await ?
426420 . context ( "Workspace not indexed. Please run `forge workspace init` first." )
@@ -432,8 +426,7 @@ impl<
432426 batch_size : usize ,
433427 dir_path : & Path ,
434428 workspace_id : & WorkspaceId ,
435- ) -> impl Stream < Item = Result < FileNode > > + Send
436- {
429+ ) -> impl Stream < Item = Result < FileNode > > + Send {
437430 let dir_path = dir_path. to_path_buf ( ) ;
438431 let infra = self . infra . clone ( ) ;
439432 let discovery = self . discovery . clone ( ) ;
@@ -578,8 +571,10 @@ impl<
578571 }
579572
580573 /// Retrieves workspace information for a specific path.
581- async fn get_workspace_info ( & self , path : PathBuf ) -> Result < Option < forge_domain:: WorkspaceInfo > >
582- {
574+ async fn get_workspace_info (
575+ & self ,
576+ path : PathBuf ,
577+ ) -> Result < Option < forge_domain:: WorkspaceInfo > > {
583578 let ( token, _user_id) = self . get_workspace_credentials ( ) . await ?;
584579 let workspace = self . find_workspace_by_path ( path, & token) . await ?;
585580
0 commit comments