Skip to content

Commit

Permalink
feat: fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
yubing744 committed Jun 5, 2024
1 parent 62f8963 commit f5132fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions moveos/moveos-wasm/src/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ fn fd_write(env: FunctionEnvMut<Env>, _fd: i32, mut iov: i32, iovcnt: i32, pnum:

fn convert_i32_pair_to_i53_checked(lo: i32, hi: i32) -> i32 {
let p0 = if lo > 0 { 1 } else { 0 };
let p1 = (hi + 0x200000) >> 0 < (0x400001 - p0);
let p1 = (hi + 0x200000) >> p0 < (0x400001 - p0);
if p1 {
let (e0, _) = (hi as u32).overflowing_add_signed(429496729);
let (e1, _) = (lo >> 0).overflowing_add_unsigned(e0);
let (e1, _) = (lo >> 1).overflowing_add_unsigned(e0);
e1
} else {
0
Expand All @@ -190,7 +190,7 @@ fn fd_seek(
_whence: i32,
) -> i32 {
let _offset = convert_i32_pair_to_i53_checked(offset_low as i32, offset_high);
return 70;
70
}

fn fd_close(_env: FunctionEnvMut<Env>, _fd: i32) -> i32 {
Expand Down

0 comments on commit f5132fd

Please sign in to comment.