From 7e750845cd6eb1290e22779a0e18573f5f518a2a Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Tue, 25 Aug 2020 17:24:19 -0700 Subject: [PATCH] Remove unnecessary check - fixed in std since Rust 1.38 issue now closed: https://github.com/rust-lang/rust/issues/63326 fix landed in a rollup: https://github.com/rust-lang/rust/pull/63380 merged aug 8, 2019 rust 1.38 beta cut on aug 15, 2019: https://blog.rust-lang.org/2019/08/15/Rust-1.37.0.html minimum supported rust version for this repo is currently 1.41. --- crates/wasi-common/src/snapshots/wasi_snapshot_preview1.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/crates/wasi-common/src/snapshots/wasi_snapshot_preview1.rs b/crates/wasi-common/src/snapshots/wasi_snapshot_preview1.rs index 342fbad1d4..ee5cd0cd80 100644 --- a/crates/wasi-common/src/snapshots/wasi_snapshot_preview1.rs +++ b/crates/wasi-common/src/snapshots/wasi_snapshot_preview1.rs @@ -172,10 +172,6 @@ impl<'a> WasiSnapshotPreview1 for WasiCtx { fn fd_filestat_set_size(&self, fd: types::Fd, size: types::Filesize) -> Result<()> { let required_rights = HandleRights::from_base(types::Rights::FD_FILESTAT_SET_SIZE); let entry = self.get_entry(fd)?; - // This check will be unnecessary when rust-lang/rust#63326 is fixed - if size > i64::max_value() as u64 { - return Err(Errno::TooBig); - } entry.as_handle(&required_rights)?.filestat_set_size(size) }