Skip to content

Commit

Permalink
updated justfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mkatychev committed Mar 26, 2024
1 parent 89276ba commit 3a9c33e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
12 changes: 6 additions & 6 deletions rustfmt.toml → fmt/rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
edition = "2018"
edition = "2021"
enum_discrim_align_threshold = 20
fn_params_layout = "Tall"
force_explicit_abi = true
hard_tabs = false
imports_granularity = "Crate"
max_width = 100
merge_derives = true
imports_granularity = "Crate"
newline_style = "Auto"
remove_nested_parens = true
reorder_imports = true
reorder_modules = true
struct_field_align_threshold = 20
tab_spaces = 4
trailing_comma = "Vertical"
unstable_features = true
use_field_init_shorthand = false
use_small_heuristics = "Default"
use_try_shorthand = true
trailing_comma = "Vertical"
struct_field_align_threshold = 20
enum_discrim_align_threshold = 20
unstable_features = true
17 changes: 12 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Run clippy with the --fix flag
fix:
cd {{invocation_directory()}}; cargo clippy --fix --all-targets --all-features
# Justfiles are processed by the just command runner (https://just.systems/).

# Run nightly cargo format
# You can install it with `brew install just` or `cargo install just`
_default:
just --list

# Run rustfmt
fmt:
cargo +nightly fmt --all
rustup run nightly cargo fmt -- \
--config-path ./fmt/rustfmt.toml

# Run clippy fix and rustfmt afterwards
fix *args: && fmt
cd {{ invocation_directory() }}; cargo clippy --fix --all-targets --all-features {{ args }}
8 changes: 4 additions & 4 deletions src/take.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub fn process_response<'a, 'b>(
"{}",
PrettyDifference {
expected: &frame.response.to_string_pretty()?,
actual: &payload_response.to_string_pretty()?,
actual: &payload_response.to_string_pretty()?,
}
);
error!(
Expand Down Expand Up @@ -327,10 +327,10 @@ mod tests {
)
.unwrap();
let payload_response = Response {
body: Some(json!("created user: BIG_BEN")),
etc: Some(json!({})),
body: Some(json!("created user: BIG_BEN")),
etc: Some(json!({})),
validation: None,
status: 200,
status: 200,
};
let mut register = Register::default();
let params = Params::default();
Expand Down

0 comments on commit 3a9c33e

Please sign in to comment.