Fixed doc failure

This commit is contained in:
G2-Games 2024-06-19 16:40:32 -05:00
parent 66863aad1e
commit dba4ba0df4
2 changed files with 9 additions and 4 deletions

View file

@ -27,6 +27,9 @@ targets = [
[lib] [lib]
crate-type = ["cdylib", "rlib"] crate-type = ["cdylib", "rlib"]
[dev-dependencies]
tokio-test = "0.4.3"
[dependencies] [dependencies]
diacritics = "0.2.0" diacritics = "0.2.0"
encoding_rs = "0.8.33" encoding_rs = "0.8.33"

View file

@ -7,22 +7,24 @@
//! To use this library, first you need to get a device from [`cross_usb`] and //! To use this library, first you need to get a device from [`cross_usb`] and
//! then open a [`NetMDContext`]. //! then open a [`NetMDContext`].
//! //!
//! ```rust //! ```no_run
//! use cross_usb::prelude::get_device; //! # tokio_test::block_on(async {
//! use cross_usb::get_device;
//! use minidisc::netmd::base::DEVICE_IDS_CROSSUSB; //! use minidisc::netmd::base::DEVICE_IDS_CROSSUSB;
//! use minidisc::NetMDContext; //! use minidisc::NetMDContext;
//! //!
//! // Get a device using the built-in list of descriptors for minidisc devices //! // Get a device using the built-in list of descriptors for minidisc devices
//! let dev_descriptor = cross_usb::get_device(DEVICE_IDS_CROSSUSB).await //! let dev_descriptor = cross_usb::get_device(DEVICE_IDS_CROSSUSB.to_vec()).await
//! .expect("Failed to find device"); //! .expect("Failed to find device");
//! //!
//! // Open a NetMD Context with the device //! // Open a NetMD Context with the device
//! let context = NetMDContext::new(dev_descriptor).await //! let mut context = NetMDContext::new(dev_descriptor).await
//! .expect("Could not create context"); //! .expect("Could not create context");
//! //!
//! // Perform operations on it ... //! // Perform operations on it ...
//! context.list_content().await //! context.list_content().await
//! .expect("Could not list disc contents"); //! .expect("Could not list disc contents");
//! # })
//! ``` //! ```
pub mod netmd; pub mod netmd;