From 82829813d6525fd1ccc987ac43d4315fa2c24679 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Thu, 12 Jan 2023 11:00:10 -0800 Subject: [PATCH] docs: don't recommend running `cargo fmt` in the background Running `cargo fmt` while you're working in an editor means that you may lose changes because of a race: 1. Your editor reads version X of file 2. `cargo fmt` reads version X 3. You save version Y from your editor 4. `cargo fmt` saves version Z, replacing Y --- docs/contributing.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/contributing.md b/docs/contributing.md index d4c2a6e8e..be7b6e23d 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -80,8 +80,9 @@ One-time setup: During development (adapt according to your preference): cargo watch --ignore '.jj/**' -s \ - 'cargo +nightly fmt && cargo clippy --workspace --all-targets \ + 'cargo clippy --workspace --all-targets \ && cargo +1.60 check --workspace --all-targets' + cargo +nightly fmt # Occasionally cargo nextest run --workspace # Occasionally cargo insta test --workspace # Occasionally