diff --git a/src/js.rs b/src/js.rs index dca554c4..fd6afa6c 100644 --- a/src/js.rs +++ b/src/js.rs @@ -418,7 +418,7 @@ extern "C" { #[wasm_bindgen(method, js_name = getInt8)] pub fn get_int8(this: &DataView, byte_offset: usize) -> i8; - /// The getInt8() method gets a signed 8-bit integer (byte) at the specified + /// The getUint8() method gets a unsigned 8-bit integer (byte) at the specified /// byte offset from the start of the DataView. /// /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getUint8 diff --git a/tests/all/js_globals/DataView.rs b/tests/all/js_globals/DataView.rs index 7fb70111..ced10a22 100644 --- a/tests/all/js_globals/DataView.rs +++ b/tests/all/js_globals/DataView.rs @@ -45,7 +45,7 @@ fn test() { import * as wasm from "./out"; export function test() { - var bytes = new Int8Array(10); + const bytes = new Int8Array(10); bytes[2] = 2; wasm.test_data_view(bytes.buffer, 2, 8); assert.equal(bytes[2], 42);