Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Dec 20, 2023
1 parent 612ec97 commit b5e0f7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ pub async fn handler<T: AsyncReadExt + AsyncWriteExt + Unpin>(

let mut used_devices = server.used_devices.write().await;
let mut available_devices = server.available_devices.write().await;
let busid_compare = &busid[..busid.iter().position(|&x| x == 0).unwrap_or(busid.len())];
let busid_compare =
&busid[..busid.iter().position(|&x| x == 0).unwrap_or(busid.len())];
for (i, dev) in available_devices.iter().enumerate() {
if busid_compare == dev.bus_id.as_bytes() {
let dev = available_devices.remove(i);
Expand Down

0 comments on commit b5e0f7e

Please sign in to comment.