Skip to content

Commit

Permalink
Simplify HidApi::add_devices
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Nov 8, 2023
1 parent 471e1f8 commit 489a678
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ impl HidApi {
/// Indexes devices that match the given VID and PID filters.
/// 0 indicates no filter.
pub fn add_devices(&mut self, vid: u16, pid: u16) -> HidResult<()> {
HidApiBackend::populate_hid_device_info_vector(&mut self.device_list, vid, pid)?;
Ok(())
HidApiBackend::populate_hid_device_info_vector(&mut self.device_list, vid, pid)
}

/// Returns iterator containing information about attached HID devices
Expand Down

0 comments on commit 489a678

Please sign in to comment.