Build fix attempts

This commit is contained in:
Luke Street 2024-02-02 16:26:45 -07:00
parent 4f794f06cb
commit ec85b8380d
7 changed files with 20 additions and 10 deletions

View File

@ -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:

View File

@ -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 <luke@street.dev>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/encounter/nod-rs"

View File

@ -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(())

View File

@ -1 +0,0 @@
msrv = "1.51"

View File

@ -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(())

View File

@ -99,8 +99,7 @@ pub fn new_disc_io_from_buf(buf: &[u8]) -> Result<Box<dyn DiscIO + '_>> {
///
/// 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];

View File

@ -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(())