Skip to content

Commit

Permalink
Merge pull request #36 from arkedge/feature/add-rustfmt-check
Browse files Browse the repository at this point in the history
Add rustfmt check
  • Loading branch information
sksat authored Aug 2, 2023
2 parents bd64bd2 + 509a00f commit aba705a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ fn get_definitions(src_file: &str) -> HashMap<String, Option<String>> {

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);
}
Expand Down

0 comments on commit aba705a

Please sign in to comment.