Add justfile and update rustfmt options

This commit is contained in:
Timothy Warren 2022-07-15 15:42:18 -04:00
parent da39b2fc9c
commit c1caf189c4
2 changed files with 39 additions and 0 deletions

32
justfile Normal file
View File

@ -0,0 +1,32 @@
# Lists the available actions
default:
@just --list
# Remove generated files
clean:
cargo clean
# Check code syntax
check:
cargo check
# Generate API docs
docs:
cargo doc
# Check code style
lint:
cargo clippy
# Format the code
fmt:
cargo +nightly fmt
# Automatically fix some code syntax/style issues
fix:
cargo fix --allow-dirty --allow-staged
just fmt
# Run the normal tests
test:
cargo test

7
rustfmt.toml Normal file
View File

@ -0,0 +1,7 @@
unstable_features = true
format_code_in_doc_comments = true
format_macro_matchers = true
format_strings = false
imports_granularity = "Module"
group_imports = "StdExternalCrate"
use_field_init_shorthand = true