Skip to content

Commit

Permalink
ignore NotSupported from set_auto_detach_kernel_driver
Browse files Browse the repository at this point in the history
  • Loading branch information
ahihi committed Aug 1, 2024
1 parent 104af50 commit 8274dd2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ fn run() -> Result<()> {
info!("control in endpoint: {:?}", ctrl_in_endpoint);
info!("control out endpoint: {:?}", ctrl_out_endpoint);

handle.set_auto_detach_kernel_driver(true).unwrap();

match handle.set_auto_detach_kernel_driver(true) {
ok@Ok(()) => Ok(()),

Check warning on line 130 in src/main.rs

View workflow job for this annotation

GitHub Actions / build (x86_64-unknown-linux-gnu)

unused variable: `ok`

Check warning on line 130 in src/main.rs

View workflow job for this annotation

GitHub Actions / build (x86_64-pc-windows-msvc)

unused variable: `ok`

Check warning on line 130 in src/main.rs

View workflow job for this annotation

GitHub Actions / build (x86_64-apple-darwin)

unused variable: `ok`
Err(rusb::Error::NotSupported) => Ok(()),
err => err
}.unwrap();

configure_endpoint(&mut handle, &ctrl_in_endpoint).unwrap();
configure_endpoint(&mut handle, &ctrl_out_endpoint).unwrap();
Expand Down

0 comments on commit 8274dd2

Please sign in to comment.