Skip to content

Commit

Permalink
Make backends async
Browse files Browse the repository at this point in the history
  • Loading branch information
Yatekii committed Jan 1, 2025
1 parent 27efde3 commit 053d89c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/linux_native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const BUS_SPI: u16 = 0x1C;
pub struct HidApiBackend;

impl HidApiBackend {
pub fn get_hid_device_info_vector(vid: u16, pid: u16) -> HidResult<Vec<DeviceInfo>> {
pub async fn get_hid_device_info_vector(vid: u16, pid: u16) -> HidResult<Vec<DeviceInfo>> {
// The C version assumes these can't fail, and they should only fail in case
// of memory allocation issues, at which point maybe we should panic
let mut enumerator = match udev::Enumerator::new() {
Expand Down
2 changes: 1 addition & 1 deletion src/windows_native/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const STRING_BUF_LEN: usize = 128;

pub struct HidApiBackend;
impl HidApiBackend {
pub fn get_hid_device_info_vector(vid: u16, pid: u16) -> HidResult<Vec<DeviceInfo>> {
pub async fn get_hid_device_info_vector(vid: u16, pid: u16) -> HidResult<Vec<DeviceInfo>> {
Ok(enumerate_devices(vid, pid)?)
}

Expand Down

0 comments on commit 053d89c

Please sign in to comment.