@@ -101,11 +101,7 @@ pub fn move_mount_fd_to(fd: &OwnedFd, target: &str) -> io::Result<()> {
101101 )
102102}
103103
104- pub fn mount_setattr_fd (
105- fd : & OwnedFd ,
106- recursive : bool ,
107- attr : & libc:: mount_attr ,
108- ) -> io:: Result < ( ) > {
104+ pub fn mount_setattr_fd ( fd : & OwnedFd , recursive : bool , attr : & libc:: mount_attr ) -> io:: Result < ( ) > {
109105 let mut flags = libc:: AT_EMPTY_PATH as c_uint ;
110106 if recursive {
111107 flags |= libc:: AT_RECURSIVE as c_uint ;
@@ -118,8 +114,10 @@ impl Mountable for MountSpec {
118114 fn seal ( & self ) -> Result < ( ) > {
119115 let tree = open_tree (
120116 libc:: AT_FDCWD ,
121- self . source . as_deref ( ) . ok_or_else ( || anyhow ! ( "source missing" ) ) ?,
122- libc:: OPEN_TREE_CLOEXEC as u32
117+ self . source
118+ . as_deref ( )
119+ . ok_or_else ( || anyhow ! ( "source missing" ) ) ?,
120+ libc:: OPEN_TREE_CLOEXEC as u32 ,
123121 ) ?;
124122
125123 let mut attr: libc:: mount_attr = unsafe { std:: mem:: zeroed ( ) } ;
@@ -196,8 +194,7 @@ impl Mountable for MountSpec {
196194 msaflags |= libc:: AT_RECURSIVE as c_uint ;
197195 }
198196
199- mount_setattr ( libc:: AT_FDCWD , & self . target , msaflags, & attr)
200- . map_err ( |e| anyhow ! ( e) ) ?;
197+ mount_setattr ( libc:: AT_FDCWD , & self . target , msaflags, & attr) . map_err ( |e| anyhow ! ( e) ) ?;
201198 }
202199
203200 Ok ( ( ) )
0 commit comments