@@ -225,7 +225,7 @@ impl sum_tree::Item for StatusEntry {
225225
226226 fn summary ( & self , _: <Self :: Summary as sum_tree:: Summary >:: Context < ' _ > ) -> Self :: Summary {
227227 PathSummary {
228- max_path : self . repo_path . 0 . clone ( ) ,
228+ max_path : self . repo_path . as_ref ( ) . clone ( ) ,
229229 item_summary : self . status . summary ( ) ,
230230 }
231231 }
@@ -235,7 +235,7 @@ impl sum_tree::KeyedItem for StatusEntry {
235235 type Key = PathKey ;
236236
237237 fn key ( & self ) -> Self :: Key {
238- PathKey ( self . repo_path . 0 . clone ( ) )
238+ PathKey ( self . repo_path . as_ref ( ) . clone ( ) )
239239 }
240240}
241241
@@ -987,7 +987,7 @@ impl GitStore {
987987 RepositoryState :: Local { backend, .. } => backend
988988 . blame ( repo_path. clone ( ) , content)
989989 . await
990- . with_context ( || format ! ( "Failed to blame {:?}" , repo_path. 0 ) )
990+ . with_context ( || format ! ( "Failed to blame {:?}" , repo_path. as_ref ( ) ) )
991991 . map ( Some ) ,
992992 RepositoryState :: Remote { project_id, client } => {
993993 let response = client
@@ -2311,7 +2311,7 @@ impl GitStore {
23112311 . entries
23122312 . into_iter ( )
23132313 . map ( |( path, status) | proto:: TreeDiffStatus {
2314- path : path. 0 . to_proto ( ) ,
2314+ path : path. as_ref ( ) . to_proto ( ) ,
23152315 status : match status {
23162316 TreeDiffStatus :: Added { } => proto:: tree_diff_status:: Status :: Added . into ( ) ,
23172317 TreeDiffStatus :: Modified { .. } => {
@@ -3087,13 +3087,13 @@ impl RepositorySnapshot {
30873087
30883088 pub fn status_for_path ( & self , path : & RepoPath ) -> Option < StatusEntry > {
30893089 self . statuses_by_path
3090- . get ( & PathKey ( path. 0 . clone ( ) ) , ( ) )
3090+ . get ( & PathKey ( path. as_ref ( ) . clone ( ) ) , ( ) )
30913091 . cloned ( )
30923092 }
30933093
30943094 pub fn pending_ops_for_path ( & self , path : & RepoPath ) -> Option < PendingOps > {
30953095 self . pending_ops_by_path
3096- . get ( & PathKey ( path. 0 . clone ( ) ) , ( ) )
3096+ . get ( & PathKey ( path. as_ref ( ) . clone ( ) ) , ( ) )
30973097 . cloned ( )
30983098 }
30993099
@@ -4653,7 +4653,9 @@ impl Repository {
46534653 }
46544654 } ;
46554655 Some ( (
4656- RepoPath ( RelPath :: from_proto ( & entry. path ) . log_err ( ) ?) ,
4656+ RepoPath :: from_rel_path (
4657+ & RelPath :: from_proto ( & entry. path ) . log_err ( ) ?,
4658+ ) ,
46574659 status,
46584660 ) )
46594661 } )
@@ -5209,7 +5211,8 @@ impl Repository {
52095211 let mut cursor = prev_statuses. cursor :: < PathProgress > ( ( ) ) ;
52105212 for path in changed_paths. into_iter ( ) {
52115213 if cursor. seek_forward ( & PathTarget :: Path ( & path) , Bias :: Left ) {
5212- changed_path_statuses. push ( Edit :: Remove ( PathKey ( path. 0 ) ) ) ;
5214+ changed_path_statuses
5215+ . push ( Edit :: Remove ( PathKey ( path. as_ref ( ) . clone ( ) ) ) ) ;
52135216 }
52145217 }
52155218 changed_path_statuses
@@ -5355,10 +5358,8 @@ fn get_permalink_in_rust_registry_src(
53555358 remote,
53565359 BuildPermalinkParams :: new (
53575360 & cargo_vcs_info. git . sha1 ,
5358- & RepoPath (
5359- RelPath :: new ( & path, PathStyle :: local ( ) )
5360- . context ( "invalid path" ) ?
5361- . into_arc ( ) ,
5361+ & RepoPath :: from_rel_path (
5362+ & RelPath :: new ( & path, PathStyle :: local ( ) ) . context ( "invalid path" ) ?,
53625363 ) ,
53635364 Some ( selection) ,
53645365 ) ,
@@ -5560,7 +5561,11 @@ async fn compute_snapshot(
55605561 let mut events = Vec :: new ( ) ;
55615562 let branches = backend. branches ( ) . await ?;
55625563 let branch = branches. into_iter ( ) . find ( |branch| branch. is_head ) ;
5563- let statuses = backend. status ( & [ RelPath :: empty ( ) . into ( ) ] ) . await ?;
5564+ let statuses = backend
5565+ . status ( & [ RepoPath :: from_rel_path (
5566+ & RelPath :: new ( "." . as_ref ( ) , PathStyle :: local ( ) ) . unwrap ( ) ,
5567+ ) ] )
5568+ . await ?;
55645569 let stash_entries = backend. stash_entries ( ) . await ?;
55655570 let statuses_by_path = SumTree :: from_iter (
55665571 statuses
0 commit comments