@@ -15,7 +15,6 @@ use uucore::display::Quotable;
1515use uucore:: error:: { ExitCode , UError , UResult , USimpleError , UUsageError , set_exit_code} ;
1616use uucore:: fs:: display_permissions_unix;
1717use uucore:: libc:: mode_t;
18- #[ cfg( not( windows) ) ]
1918use uucore:: mode;
2019use uucore:: perms:: { TraverseSymlinks , configure_symlink_and_recursion} ;
2120use uucore:: { format_usage, show, show_error} ;
@@ -375,20 +374,10 @@ impl Chmoder {
375374 }
376375 }
377376
378- #[ cfg( windows) ]
379- fn chmod_file ( & self , file : & Path ) -> UResult < ( ) > {
380- // chmod is useless on Windows
381- // it doesn't set any permissions at all
382- // instead it just sets the readonly attribute on the file
383- Ok ( ( ) )
384- }
385-
386- #[ cfg( unix) ]
387377 fn chmod_file ( & self , file : & Path ) -> UResult < ( ) > {
388378 self . chmod_file_internal ( file, self . dereference )
389379 }
390380
391- #[ cfg( unix) ]
392381 fn chmod_file_internal ( & self , file : & Path , dereference : bool ) -> UResult < ( ) > {
393382 use uucore:: { mode:: get_umask, perms:: get_metadata} ;
394383
@@ -484,7 +473,6 @@ impl Chmoder {
484473 Ok ( ( ) )
485474 }
486475
487- #[ cfg( unix) ]
488476 fn change_file ( & self , fperm : u32 , mode : u32 , file : & Path ) -> Result < ( ) , i32 > {
489477 if fperm == mode {
490478 if self . verbose && !self . changes {
0 commit comments