@@ -46,7 +46,7 @@ impl Repository {
4646 )
4747 }
4848
49- pub fn open_path ( dirfd : impl AsFd , path : impl AsRef < Path > ) -> Result < Repository > {
49+ pub fn open_path ( dirfd : impl AsFd , path : impl AsRef < Path > ) -> Result < Self > {
5050 let path = path. as_ref ( ) ;
5151
5252 // O_PATH isn't enough because flock()
@@ -56,17 +56,17 @@ impl Repository {
5656 flock ( & repository, FlockOperation :: LockShared )
5757 . context ( "Cannot lock composefs repository" ) ?;
5858
59- Ok ( Repository { repository } )
59+ Ok ( Self { repository } )
6060 }
6161
62- pub fn open_user ( ) -> Result < Repository > {
62+ pub fn open_user ( ) -> Result < Self > {
6363 let home = std:: env:: var ( "HOME" ) . with_context ( || "$HOME must be set when in user mode" ) ?;
6464
65- Repository :: open_path ( CWD , PathBuf :: from ( home) . join ( ".var/lib/composefs" ) )
65+ Self :: open_path ( CWD , PathBuf :: from ( home) . join ( ".var/lib/composefs" ) )
6666 }
6767
68- pub fn open_system ( ) -> Result < Repository > {
69- Repository :: open_path ( CWD , PathBuf :: from ( "/sysroot/composefs" . to_string ( ) ) )
68+ pub fn open_system ( ) -> Result < Self > {
69+ Self :: open_path ( CWD , PathBuf :: from ( "/sysroot/composefs" . to_string ( ) ) )
7070 }
7171
7272 fn ensure_dir ( & self , dir : impl AsRef < Path > ) -> ErrnoResult < ( ) > {
@@ -212,7 +212,7 @@ impl Repository {
212212 } ;
213213 let stream_path = format ! ( "streams/{}" , hex:: encode( sha256) ) ;
214214 let object_id = writer. done ( ) ?;
215- let object_path = Repository :: format_object_path ( & object_id) ;
215+ let object_path = Self :: format_object_path ( & object_id) ;
216216 self . ensure_symlink ( & stream_path, & object_path) ?;
217217
218218 if let Some ( name) = reference {
@@ -261,7 +261,7 @@ impl Repository {
261261 callback ( & mut writer) ?;
262262 let object_id = writer. done ( ) ?;
263263
264- let object_path = Repository :: format_object_path ( & object_id) ;
264+ let object_path = Self :: format_object_path ( & object_id) ;
265265 self . ensure_symlink ( & stream_path, & object_path) ?;
266266 object_id
267267 }
@@ -411,11 +411,11 @@ impl Repository {
411411 let filename = entry. file_name ( ) ;
412412 if filename != c"." && filename != c".." {
413413 let dirfd = openat ( & fd, filename, OFlags :: RDONLY , Mode :: empty ( ) ) ?;
414- Repository :: walk_symlinkdir ( dirfd, objects) ?;
414+ Self :: walk_symlinkdir ( dirfd, objects) ?;
415415 }
416416 }
417417 FileType :: Symlink => {
418- objects. insert ( Repository :: read_symlink_hashvalue ( & fd, entry. file_name ( ) ) ?) ;
418+ objects. insert ( Self :: read_symlink_hashvalue ( & fd, entry. file_name ( ) ) ?) ;
419419 }
420420 _ => {
421421 bail ! ( "Unexpected file type encountered" ) ;
@@ -447,7 +447,7 @@ impl Repository {
447447 OFlags :: RDONLY | OFlags :: DIRECTORY ,
448448 Mode :: empty ( ) ,
449449 ) ?;
450- Repository :: walk_symlinkdir ( refs, & mut objects) ?;
450+ Self :: walk_symlinkdir ( refs, & mut objects) ?;
451451
452452 for item in Dir :: read_from ( & category_fd) ? {
453453 let entry = item?;
0 commit comments