Skip to content

Commit 0c702e4

Browse files
authored
Use nightly rustfmt in CI (#7509)
* Use nightly rustfmt in CI * Fix current code to be nightly formatted
1 parent 25b9a34 commit 0c702e4

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.github/workflows/cargo-fmt.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ jobs:
3131
- name: Use correct Rust toolchain
3232
shell: bash
3333
run: |
34-
[ -e rust-toolchain.toml ] || cp rust/rust-toolchain.toml ./
34+
cp .github/workflows/nightly-rust-toolchain.toml rust-toolchain.toml
3535
- name: Install rust
3636
uses: actions-rust-lang/setup-rust-toolchain@v1
3737
with:
3838
cache-workspaces: rust
3939
components: rustfmt
4040

41-
- name: Run cargo fmt
41+
- name: Run nightly cargo fmt
4242
run: |
4343
cd rust
44-
cargo fmt -- --check
44+
cargo +nightly fmt -- --check
4545
shell: bash
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[toolchain]
2+
channel = "nightly"
3+
components = ["rustfmt"]

rust/kcl-lib/src/execution/kcl_value.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,9 +668,8 @@ impl From<GeometryWithImportedGeometry> for KclValue {
668668

669669
#[cfg(test)]
670670
mod tests {
671-
use crate::exec::UnitType;
672-
673671
use super::*;
672+
use crate::exec::UnitType;
674673

675674
#[test]
676675
fn test_human_friendly_type() {

0 commit comments

Comments
 (0)