diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a029195e0..6610633ca 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -32,5 +32,8 @@ jobs: reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'github-check' }} clippy_flags: --all-features + - name: format + run: cargo fmt --all -- --check + - name: unit test run: cargo test diff --git a/build.rs b/build.rs index 6b26281e6..37aff7ecb 100644 --- a/build.rs +++ b/build.rs @@ -119,7 +119,11 @@ fn get_definitions(src_file: &str) -> HashMap> { let first = token.first().unwrap(); let last = token.last().unwrap(); - if first.get_kind() == Punctuation && last.get_kind() == Punctuation && first.get_spelling() == "(" && last.get_spelling() == ")" { + if first.get_kind() == Punctuation + && last.get_kind() == Punctuation + && first.get_spelling() == "(" + && last.get_spelling() == ")" + { token.remove(0); token.remove(token.len() - 1); }