summaryrefslogtreecommitdiff
path: root/ext/webgpu/01_webgpu.js
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-03-11 23:48:00 -0400
committerGitHub <noreply@github.com>2024-03-11 23:48:00 -0400
commitad6b00a2bf061a90c72737d0ecc4a58bb0a89550 (patch)
treedaf342fa1d0dcde202a116ac010f310ba4321fa9 /ext/webgpu/01_webgpu.js
parentc38c14f51f2edc8d25f349de52fc1268b97b59b2 (diff)
chore: enable clippy unused_async rule (#22834)
Diffstat (limited to 'ext/webgpu/01_webgpu.js')
-rw-r--r--ext/webgpu/01_webgpu.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/webgpu/01_webgpu.js b/ext/webgpu/01_webgpu.js
index 55ca9c382..31b0a75f6 100644
--- a/ext/webgpu/01_webgpu.js
+++ b/ext/webgpu/01_webgpu.js
@@ -324,6 +324,7 @@ class GPU {
/**
* @param {GPURequestAdapterOptions} options
*/
+ // deno-lint-ignore require-await
async requestAdapter(options = {}) {
webidl.assertBranded(this, GPUPrototype);
options = webidl.converters.GPURequestAdapterOptions(
@@ -332,7 +333,7 @@ class GPU {
"Argument 1",
);
- const { err, ...data } = await op_webgpu_request_adapter(
+ const { err, ...data } = op_webgpu_request_adapter(
options.powerPreference,
options.forceFallbackAdapter,
);
@@ -411,6 +412,7 @@ class GPUAdapter {
* @param {GPUDeviceDescriptor} descriptor
* @returns {Promise<GPUDevice>}
*/
+ // deno-lint-ignore require-await
async requestDevice(descriptor = {}) {
webidl.assertBranded(this, GPUAdapterPrototype);
const prefix = "Failed to execute 'requestDevice' on 'GPUAdapter'";
@@ -431,7 +433,7 @@ class GPUAdapter {
}
}
- const { rid, features, limits } = await op_webgpu_request_device(
+ const { rid, features, limits } = op_webgpu_request_device(
this[_adapter].rid,
descriptor.label,
requiredFeatures,
@@ -455,7 +457,7 @@ class GPUAdapter {
* @param {string[]} unmaskHints
* @returns {Promise<GPUAdapterInfo>}
*/
- async requestAdapterInfo(unmaskHints = []) {
+ requestAdapterInfo(unmaskHints = []) {
webidl.assertBranded(this, GPUAdapterPrototype);
const prefix = "Failed to execute 'requestAdapterInfo' on 'GPUAdapter'";
unmaskHints = webidl.converters["sequence<DOMString>"](
@@ -469,9 +471,7 @@ class GPUAdapter {
architecture,
device,
description,
- } = await op_webgpu_request_adapter_info(
- this[_adapter].rid,
- );
+ } = op_webgpu_request_adapter_info(this[_adapter].rid);
const adapterInfo = webidl.createBranded(GPUAdapterInfo);
adapterInfo[_vendor] = ArrayPrototypeIncludes(unmaskHints, "vendor")
@@ -484,7 +484,7 @@ class GPUAdapter {
: "";
adapterInfo[_description] =
ArrayPrototypeIncludes(unmaskHints, "description") ? description : "";
- return adapterInfo;
+ return PromiseResolve(adapterInfo);
}
[SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) {