1- use std:: { ffi:: { OsStr , OsString } , path:: PathBuf } ;
1+ use std:: { ffi:: OsString , path:: PathBuf } ;
22
33#[ derive( Debug , Default ) ]
44pub struct Partition {
@@ -19,14 +19,14 @@ impl Partition {
1919
2020 #[ rustfmt:: skip]
2121 pub fn systemic ( & self ) -> bool {
22- let b : & [ u8 ] = self . fstype . as_ref ( ) . map_or ( b"" , |s| s. as_encoded_bytes ( ) ) ;
22+ let _b : & [ u8 ] = self . fstype . as_ref ( ) . map_or ( b"" , |s| s. as_encoded_bytes ( ) ) ;
2323 #[ cfg( target_os = "linux" ) ]
2424 {
25- matches ! ( b , b"autofs" | b"binfmt_misc" | b"bpf" | b"cgroup2" | b"configfs" | b"debugfs" | b"devpts" | b"devtmpfs" | b"fuse.gvfsd-fuse" | b"fusectl" | b"hugetlbfs" | b"mqueue" | b"proc" | b"pstore" | b"ramfs" | b"securityfs" | b"sysfs" | b"tmpfs" | b"tracefs" )
25+ matches ! ( _b , b"autofs" | b"binfmt_misc" | b"bpf" | b"cgroup2" | b"configfs" | b"debugfs" | b"devpts" | b"devtmpfs" | b"fuse.gvfsd-fuse" | b"fusectl" | b"hugetlbfs" | b"mqueue" | b"proc" | b"pstore" | b"ramfs" | b"securityfs" | b"sysfs" | b"tmpfs" | b"tracefs" )
2626 }
2727 #[ cfg( target_os = "macos" ) ]
2828 {
29- b . is_empty ( )
29+ _b . is_empty ( )
3030 }
3131 #[ cfg( not( any( target_os = "linux" , target_os = "macos" ) ) ) ]
3232 {
@@ -38,13 +38,13 @@ impl Partition {
3838impl Partition {
3939 #[ inline]
4040 #[ cfg( any( target_os = "linux" , target_os = "macos" ) ) ]
41- pub ( super ) fn new ( name : & OsStr ) -> Self {
41+ pub ( super ) fn new ( name : & std :: ffi :: OsStr ) -> Self {
4242 Self { src : std:: path:: Path :: new ( "/dev/" ) . join ( name) . into ( ) , ..Default :: default ( ) }
4343 }
4444
4545 #[ inline]
4646 #[ cfg( target_os = "linux" ) ]
47- pub ( super ) fn dev_name ( & self ) -> Option < & OsStr > {
47+ pub ( super ) fn dev_name ( & self ) -> Option < & std :: ffi :: OsStr > {
4848 std:: path:: Path :: new ( & self . src ) . strip_prefix ( "/dev/" ) . ok ( ) . map ( |p| p. as_os_str ( ) )
4949 }
5050}
0 commit comments