From 834bd28d88579f77f8044687961dafbf802bbbc1 Mon Sep 17 00:00:00 2001 From: kirk Date: Sat, 29 Nov 2025 18:38:05 +0000 Subject: [PATCH 1/2] Switch from actions-rs to actions-rust-lang for rust CI steps --- .github/workflows/rust.yml | 57 ++++++++++++++------------------------ 1 file changed, 21 insertions(+), 36 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2c9c56b..8cb66ca 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,15 +13,14 @@ jobs: - { os: ubuntu-latest, target: 'x86_64-unknown-linux-gnu' } steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable target: ${{ matrix.config.target }} - override: true - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --check + components: rustfmt + override: true + rustflags: "" + - run: cargo fmt -- --check build_all: name: Build @@ -38,11 +37,12 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable target: ${{ matrix.config.target }} override: true + rustflags: "" - name: Workaround MinGW issue # https://github.com/rust-lang/rust/issues/47048 if: runner.os == 'Linux' && matrix.config.target == 'x86_64-pc-windows-gnu' run: | @@ -51,10 +51,7 @@ jobs: sudo cp /usr/x86_64-w64-mingw32/lib/crt2.o ~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/crt2.o echo "[target.x86_64-pc-windows-gnu]" >> ~/.cargo/config echo "linker = \"/usr/bin/x86_64-w64-mingw32-gcc\"" >> ~/.cargo/config - - uses: actions-rs/cargo@v1 - with: - command: build - args: --all-targets --target=${{ matrix.config.target }} + - run: cargo build --all-targets --target ${{ matrix.config.target }} features: name: Test Individual Features @@ -71,16 +68,14 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable target: x86_64-unknown-linux-gnu override: true + rustflags: "" - - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-default-features --features "std, ${{ matrix.feature }}" + - run: cargo test --no-default-features --features "std, ${{ matrix.feature }}" no_std_features: name: Test Individual Features NoStd @@ -97,16 +92,14 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: nightly target: x86_64-unknown-linux-gnu override: true + rustflags: "" - - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-default-features --features "${{ matrix.feature }}" + - run: cargo test --no-default-features --features "${{ matrix.feature }}" test: name: Test @@ -119,17 +112,13 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable target: ${{ matrix.config.target }} override: true - - uses: actions-rs/cargo@v1 - with: - command: test - - uses: actions-rs/cargo@v1 - with: - command: test + rustflags: "" + - run: cargo test test_no_std: name: Test No Std @@ -142,15 +131,11 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: nightly target: ${{ matrix.config.target }} override: true - - uses: actions-rs/cargo@v1 - with: - command: test - - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-default-features --features "binary, json, ron, toml" + rustflags: "" + - run: cargo test + - run: cargo test --no-default-features --features "binary, json, ron, toml" From aaceb510bec9e1175397a4b22cf3b15185672597 Mon Sep 17 00:00:00 2001 From: kirk Date: Sat, 29 Nov 2025 18:44:05 +0000 Subject: [PATCH 2/2] fix rustfmt issue from master --- src/toml.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/toml.rs b/src/toml.rs index 2972383..8adb019 100644 --- a/src/toml.rs +++ b/src/toml.rs @@ -532,7 +532,8 @@ impl TomlParser { self.next(i); } - if self.cur == 'n' { // check if is "nan" + if self.cur == 'n' { + // check if is "nan" num.push(self.cur); self.next(i); if self.cur == 'a' { @@ -546,7 +547,8 @@ impl TomlParser { } } } - } else if self.cur == 'i' { // check if is "inf" + } else if self.cur == 'i' { + // check if is "inf" num.push(self.cur); self.next(i); if self.cur == 'n' {