diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 01f39f2..2a23f32 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - toolchain: [ stable, 1.56.0, nightly ] + toolchain: [ stable, 1.57.0, nightly ] env: RUSTFLAGS: -D warnings steps: @@ -133,7 +133,7 @@ jobs: sudo apt-get -y install ${{ matrix.packages }} - name: Install cargo-zigbuild if: matrix.build == 'zigbuild' - run: pip install ziglang==0.11.0 cargo-zigbuild==0.18.3 + run: pip install ziglang==0.10.1.post1 cargo-zigbuild==0.17.0 - name: Setup Rust toolchain uses: dtolnay/rust-toolchain@nightly with: diff --git a/Cargo.toml b/Cargo.toml index 4769dc7..6698a34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "nod" version = "0.2.0" edition = "2021" -rust-version = "1.56.0" +rust-version = "1.57.0" authors = ["Luke Street "] license = "MIT OR Apache-2.0" repository = "https://github.com/encounter/nod-rs" diff --git a/README.md b/README.md index 0f4a360..5177440 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [crates.io]: https://crates.io/crates/nod [Api Rustdoc]: https://img.shields.io/badge/api-rustdoc-blue.svg [rustdoc]: https://docs.rs/nod -[Rust Version]: https://img.shields.io/badge/rust-1.51+-blue.svg?maxAge=3600 +[Rust Version]: https://img.shields.io/badge/rust-1.57+-blue.svg?maxAge=3600 Library for traversing & reading GameCube and Wii disc images. @@ -54,7 +54,11 @@ fn main() -> nod::Result<()> { let header = partition.read_header()?; if let Some(NodeType::File(node)) = header.find_node("/MP3/Worlds.txt") { let mut s = String::new(); - partition.begin_file_stream(node)?.read_to_string(&mut s).expect("Failed to read file"); + partition + .begin_file_stream(node) + .expect("Failed to open file stream") + .read_to_string(&mut s) + .expect("Failed to read file"); println!("{}", s); } Ok(()) diff --git a/clippy.toml b/clippy.toml deleted file mode 100644 index 829dd1c..0000000 --- a/clippy.toml +++ /dev/null @@ -1 +0,0 @@ -msrv = "1.51" diff --git a/src/disc/mod.rs b/src/disc/mod.rs index 5da9a24..b31ac41 100644 --- a/src/disc/mod.rs +++ b/src/disc/mod.rs @@ -329,7 +329,11 @@ pub trait PartReadStream: ReadStream { /// let header = partition.read_header()?; /// if let Some(NodeType::File(node)) = header.find_node("/MP3/Worlds.txt") { /// let mut s = String::new(); - /// partition.begin_file_stream(node)?.read_to_string(&mut s).expect("Failed to read file"); + /// partition + /// .begin_file_stream(node) + /// .expect("Failed to open file stream") + /// .read_to_string(&mut s) + /// .expect("Failed to read file"); /// println!("{}", s); /// } /// Ok(()) diff --git a/src/io/mod.rs b/src/io/mod.rs index 0dc71c6..542af09 100644 --- a/src/io/mod.rs +++ b/src/io/mod.rs @@ -99,8 +99,7 @@ pub fn new_disc_io_from_buf(buf: &[u8]) -> Result> { /// /// Basic usage: /// ```no_run -/// use nod::io::new_disc_io_from_stream; -/// use nod::streams::ByteReadStream; +/// use nod::{io::new_disc_io_from_stream, streams::ByteReadStream}; /// /// # fn main() -> nod::Result<()> { /// # #[allow(non_upper_case_globals)] const buf: &[u8] = &[0u8; 0]; diff --git a/src/lib.rs b/src/lib.rs index c005e26..b7e09db 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -30,7 +30,11 @@ //! let header = partition.read_header()?; //! if let Some(NodeType::File(node)) = header.find_node("/MP3/Worlds.txt") { //! let mut s = String::new(); -//! partition.begin_file_stream(node)?.read_to_string(&mut s).expect("Failed to read file"); +//! partition +//! .begin_file_stream(node) +//! .expect("Failed to open file stream") +//! .read_to_string(&mut s) +//! .expect("Failed to read file"); //! println!("{}", s); //! } //! Ok(())