mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
fix(cli): change seek offset type from i32 to i64 (#6518)
This commit is contained in:
parent
f0093a9d8b
commit
aeadf8189a
1 changed files with 3 additions and 3 deletions
|
@ -151,7 +151,7 @@ fn op_open(
|
|||
struct SeekArgs {
|
||||
promise_id: Option<u64>,
|
||||
rid: i32,
|
||||
offset: i32,
|
||||
offset: i64,
|
||||
whence: i32,
|
||||
}
|
||||
|
||||
|
@ -169,8 +169,8 @@ fn op_seek(
|
|||
// Translate seek mode to Rust repr.
|
||||
let seek_from = match whence {
|
||||
0 => SeekFrom::Start(offset as u64),
|
||||
1 => SeekFrom::Current(i64::from(offset)),
|
||||
2 => SeekFrom::End(i64::from(offset)),
|
||||
1 => SeekFrom::Current(offset),
|
||||
2 => SeekFrom::End(offset),
|
||||
_ => {
|
||||
return Err(OpError::type_error(format!(
|
||||
"Invalid seek mode: {}",
|
||||
|
|
Loading…
Reference in a new issue