summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/console/02_console.js2
-rw-r--r--ext/crypto/00_crypto.js2
-rw-r--r--ext/fetch/21_formdata.js2
-rw-r--r--ext/ffi/lib.rs3
-rw-r--r--ext/url/00_url.js5
-rw-r--r--ext/web/06_streams.js40
-rw-r--r--ext/webgpu/01_webgpu.js32
7 files changed, 43 insertions, 43 deletions
diff --git a/ext/console/02_console.js b/ext/console/02_console.js
index 455df4570..e88b67ed2 100644
--- a/ext/console/02_console.js
+++ b/ext/console/02_console.js
@@ -978,7 +978,7 @@
symbolKeys,
(s1, s2) =>
StringPrototypeLocaleCompare(
- (s1.description ?? ""),
+ s1.description ?? "",
s2.description ?? "",
),
);
diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js
index 4c2f3e41c..2885a9699 100644
--- a/ext/crypto/00_crypto.js
+++ b/ext/crypto/00_crypto.js
@@ -225,7 +225,7 @@
if (idlType === "BufferSource" && idlValue) {
normalizedAlgorithm[member] = TypedArrayPrototypeSlice(
new Uint8Array(
- (ArrayBufferIsView(idlValue) ? idlValue.buffer : idlValue),
+ ArrayBufferIsView(idlValue) ? idlValue.buffer : idlValue,
idlValue.byteOffset ?? 0,
idlValue.byteLength,
),
diff --git a/ext/fetch/21_formdata.js b/ext/fetch/21_formdata.js
index d8e6d2da2..555e31a69 100644
--- a/ext/fetch/21_formdata.js
+++ b/ext/fetch/21_formdata.js
@@ -266,7 +266,7 @@
StringPrototypeReplace(
StringPrototypeReplace(
StringPrototypeReplace(
- (isFilename ? str : StringPrototypeReplace(str, /\r?\n|\r/g, "\r\n")),
+ isFilename ? str : StringPrototypeReplace(str, /\r?\n|\r/g, "\r\n"),
/\n/g,
"%0A",
),
diff --git a/ext/ffi/lib.rs b/ext/ffi/lib.rs
index d2b0d24df..4b83070d3 100644
--- a/ext/ffi/lib.rs
+++ b/ext/ffi/lib.rs
@@ -294,7 +294,6 @@ pub(crate) fn format_error(e: dlopen::Error, path: String) -> String {
use std::ffi::OsStr;
use std::os::windows::ffi::OsStrExt;
use winapi::shared::minwindef::DWORD;
- use winapi::shared::ntdef::WCHAR;
use winapi::shared::winerror::ERROR_INSUFFICIENT_BUFFER;
use winapi::um::errhandlingapi::GetLastError;
use winapi::um::winbase::FormatMessageW;
@@ -314,7 +313,7 @@ pub(crate) fn format_error(e: dlopen::Error, path: String) -> String {
let lang_id =
MAKELANGID(LANG_SYSTEM_DEFAULT, SUBLANG_SYS_DEFAULT) as DWORD;
- let mut buf = vec![0 as WCHAR; 500];
+ let mut buf = vec![0; 500];
let path = OsStr::new(&path)
.encode_wide()
diff --git a/ext/url/00_url.js b/ext/url/00_url.js
index b1b3818a3..b483d8bd5 100644
--- a/ext/url/00_url.js
+++ b/ext/url/00_url.js
@@ -105,8 +105,9 @@
this[_list] = ArrayPrototypeMap(init, (pair, i) => {
if (pair.length !== 2) {
throw new TypeError(
- `${prefix}: Item ${i +
- 0} in the parameter list does have length 2 exactly.`,
+ `${prefix}: Item ${
+ i + 0
+ } in the parameter list does have length 2 exactly.`,
);
}
return [pair[0], pair[1]];
diff --git a/ext/web/06_streams.js b/ext/web/06_streams.js
index d062f7fbc..bf6b9722c 100644
--- a/ext/web/06_streams.js
+++ b/ext/web/06_streams.js
@@ -1499,17 +1499,17 @@
if (canceled1 === false) {
readableStreamDefaultControllerEnqueue(
- /** @type {ReadableStreamDefaultController<any>} */ (branch1[
+ /** @type {ReadableStreamDefaultController<any>} */ branch1[
_controller
- ]),
+ ],
value1,
);
}
if (canceled2 === false) {
readableStreamDefaultControllerEnqueue(
- /** @type {ReadableStreamDefaultController<any>} */ (branch2[
+ /** @type {ReadableStreamDefaultController<any>} */ branch2[
_controller
- ]),
+ ],
value2,
);
}
@@ -1519,16 +1519,16 @@
reading = false;
if (canceled1 === false) {
readableStreamDefaultControllerClose(
- /** @type {ReadableStreamDefaultController<any>} */ (branch1[
+ /** @type {ReadableStreamDefaultController<any>} */ branch1[
_controller
- ]),
+ ],
);
}
if (canceled2 === false) {
readableStreamDefaultControllerClose(
- /** @type {ReadableStreamDefaultController<any>} */ (branch2[
+ /** @type {ReadableStreamDefaultController<any>} */ branch2[
_controller
- ]),
+ ],
);
}
cancelPromise.resolve(undefined);
@@ -1586,15 +1586,15 @@
uponRejection(reader[_closedPromise].promise, (r) => {
readableStreamDefaultControllerError(
- /** @type {ReadableStreamDefaultController<any>} */ (branch1[
+ /** @type {ReadableStreamDefaultController<any>} */ branch1[
_controller
- ]),
+ ],
r,
);
readableStreamDefaultControllerError(
- /** @type {ReadableStreamDefaultController<any>} */ (branch2[
+ /** @type {ReadableStreamDefaultController<any>} */ branch2[
_controller
- ]),
+ ],
r,
);
if (canceled1 === false || canceled2 === false) {
@@ -2142,14 +2142,14 @@
const readableController = stream[_readable][_controller];
if (
readableStreamDefaultControllerCanCloseOrEnqueue(
- /** @type {ReadableStreamDefaultController<O>} */ (readableController),
+ /** @type {ReadableStreamDefaultController<O>} */ readableController,
) === false
) {
throw new TypeError("Readable stream is unavailable.");
}
try {
readableStreamDefaultControllerEnqueue(
- /** @type {ReadableStreamDefaultController<O>} */ (readableController),
+ /** @type {ReadableStreamDefaultController<O>} */ readableController,
chunk,
);
} catch (e) {
@@ -2157,7 +2157,7 @@
throw stream[_readable][_storedError];
}
const backpressure = readableStreamDefaultcontrollerHasBackpressure(
- /** @type {ReadableStreamDefaultController<O>} */ (readableController),
+ /** @type {ReadableStreamDefaultController<O>} */ readableController,
);
if (backpressure !== stream[_backpressure]) {
assert(backpressure === true);
@@ -2192,7 +2192,7 @@
const stream = controller[_stream];
const readableController = stream[_readable][_controller];
readableStreamDefaultControllerClose(
- /** @type {ReadableStreamDefaultController} */ (readableController),
+ /** @type {ReadableStreamDefaultController} */ readableController,
);
const error = new TypeError("The stream has been terminated.");
transformStreamErrorWritableAndUnblockWrite(stream, error);
@@ -2224,7 +2224,7 @@
throw readable[_storedError];
}
readableStreamDefaultControllerClose(
- /** @type {ReadableStreamDefaultController} */ (readable[_controller]),
+ /** @type {ReadableStreamDefaultController} */ readable[_controller],
);
}, (r) => {
transformStreamError(stream, r);
@@ -2278,9 +2278,9 @@
*/
function transformStreamError(stream, e) {
readableStreamDefaultControllerError(
- /** @type {ReadableStreamDefaultController} */ (stream[_readable][
+ /** @type {ReadableStreamDefaultController} */ stream[_readable][
_controller
- ]),
+ ],
e,
);
transformStreamErrorWritableAndUnblockWrite(stream, e);
@@ -3858,7 +3858,7 @@
webidl.assertBranded(this, TransformStreamDefaultController);
const readableController = this[_stream][_readable][_controller];
return readableStreamDefaultControllerGetDesiredSize(
- /** @type {ReadableStreamDefaultController<O>} */ (readableController),
+ /** @type {ReadableStreamDefaultController<O>} */ readableController,
);
}
diff --git a/ext/webgpu/01_webgpu.js b/ext/webgpu/01_webgpu.js
index 9d7ce3f3a..4b5101bf4 100644
--- a/ext/webgpu/01_webgpu.js
+++ b/ext/webgpu/01_webgpu.js
@@ -849,7 +849,7 @@
descriptor.usage,
options,
);
- device.trackResource((buffer));
+ device.trackResource(buffer);
return buffer;
}
@@ -878,7 +878,7 @@
device,
rid,
);
- device.trackResource((texture));
+ device.trackResource(texture);
return texture;
}
@@ -905,7 +905,7 @@
device,
rid,
);
- device.trackResource((sampler));
+ device.trackResource(sampler);
return sampler;
}
@@ -948,7 +948,7 @@
device,
rid,
);
- device.trackResource((bindGroupLayout));
+ device.trackResource(bindGroupLayout);
return bindGroupLayout;
}
@@ -990,7 +990,7 @@
device,
rid,
);
- device.trackResource((pipelineLayout));
+ device.trackResource(pipelineLayout);
return pipelineLayout;
}
@@ -1083,7 +1083,7 @@
device,
rid,
);
- device.trackResource((bindGroup));
+ device.trackResource(bindGroup);
return bindGroup;
}
@@ -1115,7 +1115,7 @@
device,
rid,
);
- device.trackResource((shaderModule));
+ device.trackResource(shaderModule);
return shaderModule;
}
@@ -1172,7 +1172,7 @@
device,
rid,
);
- device.trackResource((computePipeline));
+ device.trackResource(computePipeline);
return computePipeline;
}
@@ -1247,7 +1247,7 @@
device,
rid,
);
- device.trackResource((renderPipeline));
+ device.trackResource(renderPipeline);
return renderPipeline;
}
@@ -1284,7 +1284,7 @@
device,
rid,
);
- device.trackResource((commandEncoder));
+ device.trackResource(commandEncoder);
return commandEncoder;
}
@@ -1319,7 +1319,7 @@
device,
rid,
);
- device.trackResource((renderBundleEncoder));
+ device.trackResource(renderBundleEncoder);
return renderBundleEncoder;
}
@@ -1351,7 +1351,7 @@
rid,
descriptor,
);
- device.trackResource((querySet));
+ device.trackResource(querySet);
return querySet;
}
@@ -2436,7 +2436,7 @@
device,
rid,
);
- device.trackResource((bindGroupLayout));
+ device.trackResource(bindGroupLayout);
return bindGroupLayout;
}
@@ -2511,7 +2511,7 @@
device,
rid,
);
- device.trackResource((bindGroupLayout));
+ device.trackResource(bindGroupLayout);
return bindGroupLayout;
}
@@ -3277,7 +3277,7 @@
device,
rid,
);
- device.trackResource((commandBuffer));
+ device.trackResource(commandBuffer);
return commandBuffer;
}
@@ -4606,7 +4606,7 @@
device,
rid,
);
- device.trackResource((renderBundle));
+ device.trackResource(renderBundle);
return renderBundle;
}