Skip to content

Commit

Permalink
Use actions-rust-lang.
Browse files Browse the repository at this point in the history
Possibly better github actions for compiling rust.
  • Loading branch information
kaj committed Oct 11, 2024
1 parent e8492fd commit 7863282
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 35 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/rust-problem-matcher.json

This file was deleted.

22 changes: 9 additions & 13 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- run: echo "::add-matcher::.github/workflows/rust-problem-matcher.json"
- run: cargo fmt --all -- --check
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1

# Run clippy on stable only
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
- run: echo "::add-matcher::.github/workflows/rust-problem-matcher.json"
rustflags: ""
- run: cargo clippy --all-features

test-all:
Expand All @@ -41,10 +41,9 @@ jobs:
- nightly
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- run: echo "::add-matcher::.github/workflows/rust-problem-matcher.json"
- run: cargo build
- run: cargo test -q

Expand All @@ -59,10 +58,9 @@ jobs:
- 1.74.1
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- run: echo "::add-matcher::.github/workflows/rust-problem-matcher.json"
- run: cargo test -q

test-macos:
Expand All @@ -76,10 +74,9 @@ jobs:
- 1.74.1
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- run: echo "::add-matcher::.github/workflows/rust-problem-matcher.json"
- run: cargo test -q

test-old:
Expand All @@ -94,9 +91,8 @@ jobs:
- 1.61.0
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- run: echo "::add-matcher::.github/workflows/rust-problem-matcher.json"
- run: sed -i 's/"rsass-cli",/# \0/' Cargo.toml
- run: cargo test --package rsass-macros -q
2 changes: 1 addition & 1 deletion rsass/src/value/number.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ impl<'a> fmt::Display for Formatted<'a, Number> {
if frac != 0. {
let max_decimals = 16 - whole.log10().ceil() as usize;
for _ in 1..max_decimals.min(self.format.precision) {
frac *= 10.;
frac = frac * 10.;

Check warning on line 250 in rsass/src/value/number.rs

View workflow job for this annotation

GitHub Actions / Clippy

manual implementation of an assign operation

Check warning on line 250 in rsass/src/value/number.rs

View workflow job for this annotation

GitHub Actions / Clippy

manual implementation of an assign operation
write!(dec, "{}", (frac as i8).abs())?;
frac = frac.fract();
if frac == 0. {
Expand Down

0 comments on commit 7863282

Please sign in to comment.