@@ -2057,15 +2057,15 @@ impl PathData {
20572057
20582058 #[ cfg( all( unix, not( any( target_os = "android" , target_os = "macos" ) ) ) ) ]
20592059 pub fn has_acl ( & self ) -> bool {
2060- opt_xattrs. as_ref ( ) . is_some_and ( |inner| {
2061- if self . file_type ( ) . is_some_and ( FileType :: is_symlink) {
2062- return false ;
2063- }
2060+ if self . file_type ( ) . is_some_and ( FileType :: is_symlink) {
2061+ return false ;
2062+ }
20642063
2065- let opt_xattrs = self
2066- . xattrs
2067- . get_or_init ( || retrieve_xattr_list ( self . path ( ) ) . ok ( ) ) ;
2064+ let opt_xattrs = self
2065+ . xattrs
2066+ . get_or_init ( || retrieve_xattr_list ( self . path ( ) ) . ok ( ) ) ;
20682067
2068+ opt_xattrs. as_ref ( ) . is_some_and ( |inner| {
20692069 inner
20702070 . iter ( )
20712071 . filter_map ( |key| key. to_str ( ) . map ( str:: to_lowercase) )
@@ -2075,19 +2075,19 @@ impl PathData {
20752075
20762076 #[ cfg( all( unix, not( any( target_os = "android" , target_os = "macos" ) ) ) ) ]
20772077 pub fn has_security_cap ( & self ) -> bool {
2078- xattrs. as_ref ( ) . is_some_and ( |inner| {
2079- if self . file_type ( ) . is_some_and ( FileType :: is_symlink) {
2080- return false ;
2081- }
2078+ if self . file_type ( ) . is_some_and ( FileType :: is_symlink) {
2079+ return false ;
2080+ }
20822081
2083- let cap_key = OsStr :: new ( "security.capability" ) ;
2082+ let cap_key = OsStr :: new ( "security.capability" ) ;
20842083
2085- let xattrs = self
2086- . xattrs
2087- . get_or_init ( || retrieve_xattr_list ( self . path ( ) ) . ok ( ) ) ;
2084+ let xattrs = self
2085+ . xattrs
2086+ . get_or_init ( || retrieve_xattr_list ( self . path ( ) ) . ok ( ) ) ;
20882087
2089- inner. get ( cap_key) . is_some ( )
2090- } )
2088+ xattrs
2089+ . as_ref ( )
2090+ . is_some_and ( |inner| inner. get ( cap_key) . is_some ( ) )
20912091 }
20922092
20932093 fn file_type ( & self ) -> Option < & FileType > {
0 commit comments