File tree Expand file tree Collapse file tree 4 files changed +12
-10
lines changed
Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -779,10 +779,10 @@ impl<M: MergeInput> SyncFileMerger<'_, M> {
779779}
780780
781781#[ cfg( wasi_no_threads) ]
782- fn merge_without_limit_sync < ' a , M : MergeInput + ' static , F : Iterator < Item = UResult < M > > > (
782+ fn merge_without_limit_sync < M : MergeInput + ' static , F : Iterator < Item = UResult < M > > > (
783783 files : F ,
784- settings : & ' a GlobalSettings ,
785- ) -> UResult < SyncFileMerger < ' a , M > > {
784+ settings : & GlobalSettings ,
785+ ) -> UResult < SyncFileMerger < ' _ , M > > {
786786 let separator = settings. line_ending . into ( ) ;
787787 let mut readers: Vec < Option < SyncReaderFile < M > > > = Vec :: new ( ) ;
788788 let mut mergeable_files = Vec :: new ( ) ;
Original file line number Diff line number Diff line change @@ -807,7 +807,10 @@ fn parse_timestamp(s: &str) -> UResult<FileTime> {
807807///
808808/// On Windows, uses `GetFinalPathNameByHandleW` to attempt to get the path
809809/// from the stdout handle.
810- #[ cfg_attr( not( windows) , expect( clippy:: unnecessary_wraps) ) ]
810+ #[ cfg_attr(
811+ not( any( windows, target_os = "wasi" ) ) ,
812+ expect( clippy:: unnecessary_wraps)
813+ ) ]
811814fn pathbuf_from_stdout ( ) -> Result < PathBuf , TouchError > {
812815 #[ cfg( all( unix, not( target_os = "android" ) ) ) ]
813816 {
@@ -818,11 +821,9 @@ fn pathbuf_from_stdout() -> Result<PathBuf, TouchError> {
818821 Ok ( PathBuf :: from ( "/proc/self/fd/1" ) )
819822 }
820823 #[ cfg( target_os = "wasi" ) ]
821- {
822- return Err ( TouchError :: UnsupportedPlatformFeature (
823- "touch - (stdout) is not supported on WASI" . to_string ( ) ,
824- ) ) ;
825- }
824+ return Err ( TouchError :: UnsupportedPlatformFeature (
825+ "touch - (stdout) is not supported on WASI" . to_string ( ) ,
826+ ) ) ;
826827 #[ cfg( windows) ]
827828 {
828829 use std:: os:: windows:: prelude:: AsRawHandle ;
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ impl FileInformation {
188188 #[ cfg( windows) ]
189189 return self . 0 . number_of_links ( ) ;
190190 #[ cfg( target_os = "wasi" ) ]
191- return self . 0 . st_nlink as u64 ;
191+ return self . 0 . st_nlink ;
192192 }
193193
194194 #[ cfg( unix) ]
Original file line number Diff line number Diff line change @@ -458,6 +458,7 @@ use std::ptr;
458458use std:: slice;
459459
460460/// Read file system list.
461+ #[ cfg_attr( target_os = "wasi" , allow( clippy:: unnecessary_wraps) ) ]
461462pub fn read_fs_list ( ) -> UResult < Vec < MountInfo > > {
462463 #[ cfg( any( target_os = "linux" , target_os = "android" , target_os = "cygwin" ) ) ]
463464 {
You can’t perform that action at this time.
0 commit comments