Compare commits

..

No commits in common. "71fafc0b0d7ef73dcc7162cd5d93488c1ec39996" and "782cbfa7f5a6b5ac8a8b8273cae44db3b078fe57" have entirely different histories.

3 changed files with 7 additions and 11 deletions

View file

@ -3,5 +3,5 @@ rustflags = ["--cfg=web_sys_unstable_apis"]
[build]
#just comment in the "current" target
#target = "x86_64-unknown-linux-gnu"
target = "wasm32-unknown-unknown"
target = "x86_64-unknown-linux-gnu"
#target = "wasm32-unknown-unknown"

View file

@ -11,16 +11,16 @@ keywords = ["usb", "wasm", "web-usb", "webusb"]
categories = ["wasm", "web-programming", "hardware-support"]
readme = "README.md"
license = "MIT"
edition = "2024"
edition = "2021"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
thiserror = "2.0"
thiserror = "1.0"
[dev-dependencies]
tokio-test = "0.4"
tokio-test = "0.4.3"
# Wasm deps
[target.'cfg(target_family = "wasm")'.dependencies]

View file

@ -410,9 +410,7 @@ impl<'a> UsbInterface<'a> for Interface {
let result: UsbOutTransferResult = match JsFuture::from(Promise::resolve(
&self
.device
.control_transfer_out_with_buffer_source(&params, array_obj)
.map_err(|j| Error::CommunicationError(j.as_string().unwrap_or_default()))?
.into(),
.control_transfer_out_with_buffer_source(&params, array_obj),
))
.await
{
@ -450,9 +448,7 @@ impl<'a> UsbInterface<'a> for Interface {
let promise = Promise::resolve(
&self
.device
.transfer_out_with_buffer_source(endpoint, array_obj)
.map_err(|j| Error::CommunicationError(j.as_string().unwrap_or_default()))?
.into(),
.transfer_out_with_buffer_source(endpoint, array_obj),
);
let result = JsFuture::from(promise).await;