Skip to content

Commit

Permalink
chore: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
caixiangyue committed Nov 13, 2023
1 parent 7812a31 commit c0d2697
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Format
run: cargo fmt --check
- name: Clippy
run: cargo clippy
- name: Build
Expand Down
16 changes: 16 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version = "Two"
unstable_features = true

comment_width = 80
wrap_comments = true
format_code_in_doc_comments = true
format_macro_bodies = true
format_macro_matchers = true
normalize_comments = true
normalize_doc_attributes = true
condense_wildcard_suffixes = true
newline_style = "Unix"
use_field_init_shorthand = true
use_try_shorthand = true
imports_granularity = "Crate"
group_imports = "StdExternalCrate"
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ fn main() {

// 美化打印
println!("{:?}", peter);
}
}

0 comments on commit c0d2697

Please sign in to comment.