Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 21 additions & 36 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"
6 changes: 4 additions & 2 deletions src/toml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'\u{41}'..='\u{5A}'
| '\u{61}'..='\u{7A}'
| '\u{30}'..='\u{39}'
| '\u{2D}'

Check warning on line 15 in src/toml.rs

View workflow job for this annotation

GitHub Actions / Test Individual Features (toml)

unreachable pattern

Check warning on line 15 in src/toml.rs

View workflow job for this annotation

GitHub Actions / Test Individual Features NoStd (toml)

unreachable pattern

Check warning on line 15 in src/toml.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, wasm32-unknown-unknown)

unreachable pattern

Check warning on line 15 in src/toml.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, x86_64-unknown-linux-gnu)

unreachable pattern

Check warning on line 15 in src/toml.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, x86_64-unknown-linux-gnu)

unreachable pattern

Check warning on line 15 in src/toml.rs

View workflow job for this annotation

GitHub Actions / Test No Std (ubuntu-latest, x86_64-unknown-linux-gnu)

unreachable pattern

Check warning on line 15 in src/toml.rs

View workflow job for this annotation

GitHub Actions / Test No Std (ubuntu-latest, x86_64-unknown-linux-gnu)

unreachable pattern

Check warning on line 15 in src/toml.rs

View workflow job for this annotation

GitHub Actions / Build (macos-latest, x86_64-apple-darwin)

unreachable pattern

Check warning on line 15 in src/toml.rs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, x86_64-pc-windows-gnu)

unreachable pattern

Check warning on line 15 in src/toml.rs

View workflow job for this annotation

GitHub Actions / Build (windows-latest, x86_64-pc-windows-msvc)

unreachable pattern
| '\u{5F}'
| '\u{B2}'
| '\u{B3}'
Expand Down Expand Up @@ -532,7 +532,8 @@
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' {
Expand All @@ -546,7 +547,8 @@
}
}
}
} 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' {
Expand Down
Loading