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
|
- 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
|
||||||
|
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)]
|
#[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() {
|
||||||
|
Reference in New Issue
Block a user