Use nightly rustfmt in CI (#7509)

* Use nightly rustfmt in CI

* Fix current code to be nightly formatted
This commit is contained in:
Jonathan Tran
2025-06-17 14:30:33 -04:00
committed by GitHub
parent 25b9a34640
commit 0c702e4bab
3 changed files with 7 additions and 5 deletions

View File

@ -31,15 +31,15 @@ jobs:
- name: Use correct Rust toolchain - name: Use correct Rust toolchain
shell: bash shell: bash
run: | run: |
[ -e rust-toolchain.toml ] || cp rust/rust-toolchain.toml ./ cp .github/workflows/nightly-rust-toolchain.toml rust-toolchain.toml
- name: Install rust - name: Install rust
uses: actions-rust-lang/setup-rust-toolchain@v1 uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
cache-workspaces: rust cache-workspaces: rust
components: rustfmt components: rustfmt
- name: Run cargo fmt - name: Run nightly cargo fmt
run: | run: |
cd rust cd rust
cargo fmt -- --check cargo +nightly fmt -- --check
shell: bash shell: bash

View File

@ -0,0 +1,3 @@
[toolchain]
channel = "nightly"
components = ["rustfmt"]

View File

@ -668,9 +668,8 @@ impl From<GeometryWithImportedGeometry> for KclValue {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use crate::exec::UnitType;
use super::*; use super::*;
use crate::exec::UnitType;
#[test] #[test]
fn test_human_friendly_type() { fn test_human_friendly_type() {