From 0a75b6a0134682e3979e151bb80e5f17cec9c290 Mon Sep 17 00:00:00 2001 From: G2-Games Date: Wed, 14 Aug 2024 13:39:03 -0500 Subject: [PATCH] Fixed imports --- src/netmd/base.rs | 4 ++-- src/netmd/commands.rs | 4 ++-- src/netmd/interface.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/netmd/base.rs b/src/netmd/base.rs index 6de3190..0c3f85c 100644 --- a/src/netmd/base.rs +++ b/src/netmd/base.rs @@ -7,7 +7,7 @@ use thiserror::Error; // USB stuff use cross_usb::prelude::*; use cross_usb::usb::{ControlIn, ControlOut, ControlType, Recipient, UsbError}; -use cross_usb::{DeviceInfo, Interface}; +use cross_usb::{Descriptor, Interface}; use super::utils::cross_sleep; @@ -132,7 +132,7 @@ impl NetMD { const READ_REPLY_RETRY_INTERVAL: u32 = 10; /// Creates a new interface to a NetMD device - pub async fn new(usb_descriptor: DeviceInfo) -> Result { + pub async fn new(usb_descriptor: Descriptor) -> Result { let mut model = DeviceId { vendor_id: usb_descriptor.vendor_id().await, product_id: usb_descriptor.product_id().await, diff --git a/src/netmd/commands.rs b/src/netmd/commands.rs index ad9d0ee..631f5a6 100644 --- a/src/netmd/commands.rs +++ b/src/netmd/commands.rs @@ -1,5 +1,5 @@ #![cfg_attr(debug_assertions, allow(dead_code))] -use cross_usb::DeviceInfo; +use cross_usb::Descriptor; use num_derive::FromPrimitive; use num_traits::FromPrimitive; use regex::Regex; @@ -278,7 +278,7 @@ pub struct NetMDContext { impl NetMDContext { /// Create a new context to control a NetMD device - pub async fn new(device: DeviceInfo) -> Result { + pub async fn new(device: Descriptor) -> Result { let interface = NetMDInterface::new(device).await?; Ok(Self { interface }) diff --git a/src/netmd/interface.rs b/src/netmd/interface.rs index 0cf1276..eeaa3f6 100644 --- a/src/netmd/interface.rs +++ b/src/netmd/interface.rs @@ -310,7 +310,7 @@ impl NetMDInterface { const INTERIM_RESPONSE_RETRY_INTERVAL: u32 = 100; /// Get a new interface to a NetMD device - pub async fn new(device: cross_usb::DeviceInfo) -> Result { + pub async fn new(device: cross_usb::Descriptor) -> Result { let device = base::NetMD::new(device).await?; Ok(NetMDInterface { device }) }