1
- use anyhow:: { bail , Context , Error , Ok , Result } ;
1
+ use anyhow:: { Context , Error , Ok , Result , bail } ;
2
2
use std:: {
3
- fs:: { create_dir_all , remove_file , write , File , OpenOptions } ,
3
+ fs:: { File , OpenOptions , create_dir_all , remove_file , write } ,
4
4
io:: {
5
5
ErrorKind :: { AlreadyExists , NotFound } ,
6
6
Write ,
@@ -11,7 +11,7 @@ use std::{
11
11
12
12
use crate :: { assets, boot_patch, defs, ksucalls, module, restorecon} ;
13
13
#[ allow( unused_imports) ]
14
- use std:: fs:: { set_permissions , Permissions } ;
14
+ use std:: fs:: { Permissions , set_permissions } ;
15
15
#[ cfg( unix) ]
16
16
use std:: os:: unix:: prelude:: PermissionsExt ;
17
17
@@ -24,7 +24,7 @@ use std::path::PathBuf;
24
24
#[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
25
25
use rustix:: {
26
26
process,
27
- thread:: { move_into_link_name_space , LinkNameSpaceType } ,
27
+ thread:: { LinkNameSpaceType , move_into_link_name_space } ,
28
28
} ;
29
29
30
30
pub fn ensure_clean_dir ( dir : impl AsRef < Path > ) -> Result < ( ) > {
@@ -129,7 +129,7 @@ pub fn get_zip_uncompressed_size(zip_path: &str) -> Result<u64> {
129
129
pub fn switch_mnt_ns ( pid : i32 ) -> Result < ( ) > {
130
130
use rustix:: {
131
131
fd:: AsFd ,
132
- fs:: { open , Mode , OFlags } ,
132
+ fs:: { Mode , OFlags , open } ,
133
133
} ;
134
134
let path = format ! ( "/proc/{pid}/ns/mnt" ) ;
135
135
let fd = open ( path, OFlags :: RDONLY , Mode :: from_raw_mode ( 0 ) ) ?;
0 commit comments