Use nightly rustfmt in CI (#7509)
* Use nightly rustfmt in CI * Fix current code to be nightly formatted
This commit is contained in:
6
.github/workflows/cargo-fmt.yml
vendored
6
.github/workflows/cargo-fmt.yml
vendored
@ -31,15 +31,15 @@ jobs:
|
||||
- name: Use correct Rust toolchain
|
||||
shell: bash
|
||||
run: |
|
||||
[ -e rust-toolchain.toml ] || cp rust/rust-toolchain.toml ./
|
||||
cp .github/workflows/nightly-rust-toolchain.toml rust-toolchain.toml
|
||||
- name: Install rust
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
cache-workspaces: rust
|
||||
components: rustfmt
|
||||
|
||||
- name: Run cargo fmt
|
||||
- name: Run nightly cargo fmt
|
||||
run: |
|
||||
cd rust
|
||||
cargo fmt -- --check
|
||||
cargo +nightly fmt -- --check
|
||||
shell: bash
|
||||
|
3
.github/workflows/nightly-rust-toolchain.toml
vendored
Normal file
3
.github/workflows/nightly-rust-toolchain.toml
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[toolchain]
|
||||
channel = "nightly"
|
||||
components = ["rustfmt"]
|
@ -668,9 +668,8 @@ impl From<GeometryWithImportedGeometry> for KclValue {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::exec::UnitType;
|
||||
|
||||
use super::*;
|
||||
use crate::exec::UnitType;
|
||||
|
||||
#[test]
|
||||
fn test_human_friendly_type() {
|
||||
|
Reference in New Issue
Block a user