diff --git a/.github/workflows/rust-problem-matcher.json b/.github/workflows/rust-problem-matcher.json deleted file mode 100644 index 9117966b..00000000 --- a/.github/workflows/rust-problem-matcher.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "rust", - "pattern": [ - { - "regexp": "^(?:\\x1b\\[[\\d;]+m)*(warning|warn|error)(?:\\x1b\\[[\\d;]+m)*(\\[(.*)\\])?(?:\\x1b\\[[\\d;]+m)*:(?:\\x1b\\[[\\d;]+m)* ([^\\x1b]*)(?:\\x1b\\[[\\d;]+m)*$", - "severity": 1, - "message": 4, - "code": 3 - }, - { - "regexp": "^(?:\\x1b\\[[\\d;]+m)*\\s*(?:\\x1b\\[[\\d;]+m)*\\s*--> (?:\\x1b\\[[\\d;]+m)*(.*):(\\d*):(\\d*)(?:\\x1b\\[[\\d;]+m)*$", - "file": 1, - "line": 2, - "column": 3 - } - ] - } - ] -} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a5caec7a..4633703f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,11 +10,11 @@ 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: @@ -22,10 +22,10 @@ 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: clippy - - run: echo "::add-matcher::.github/workflows/rust-problem-matcher.json" + rustflags: "" - run: cargo clippy --all-features test-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 @@ -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: @@ -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: @@ -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 diff --git a/rsass/src/value/number.rs b/rsass/src/value/number.rs index e722d768..085f22dd 100644 --- a/rsass/src/value/number.rs +++ b/rsass/src/value/number.rs @@ -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.; write!(dec, "{}", (frac as i8).abs())?; frac = frac.fract(); if frac == 0. {