Skip to content

Commit 7e75084

Browse files
committed
Remove unnecessary check - fixed in std since Rust 1.38
issue now closed: rust-lang/rust#63326 fix landed in a rollup: rust-lang/rust#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.
1 parent f54685d commit 7e75084

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

crates/wasi-common/src/snapshots/wasi_snapshot_preview1.rs

-4
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,6 @@ impl<'a> WasiSnapshotPreview1 for WasiCtx {
172172
fn fd_filestat_set_size(&self, fd: types::Fd, size: types::Filesize) -> Result<()> {
173173
let required_rights = HandleRights::from_base(types::Rights::FD_FILESTAT_SET_SIZE);
174174
let entry = self.get_entry(fd)?;
175-
// This check will be unnecessary when rust-lang/rust#63326 is fixed
176-
if size > i64::max_value() as u64 {
177-
return Err(Errno::TooBig);
178-
}
179175
entry.as_handle(&required_rights)?.filestat_set_size(size)
180176
}
181177

0 commit comments

Comments
 (0)