Patchwork D7911: examples: refer to nightly rustfmt in Windows-compatible way

login
register
mail settings
Submitter phabricator
Date Jan. 16, 2020, 4:41 p.m.
Message ID <differential-rev-PHID-DREV-rjja25ytm3wz7p262cxd-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44448/
State Superseded
Headers show

Comments

phabricator - Jan. 16, 2020, 4:41 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Thanks to Jun Wu for the tip. I found that the new form also gave
  better error messages when the nightly rustfmt wasn't installed (it
  told me which command to run instead of just saying "error: not a
  file: <some path>").

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D7911

AFFECTED FILES
  contrib/examples/fix.hgrc

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/contrib/examples/fix.hgrc b/contrib/examples/fix.hgrc
--- a/contrib/examples/fix.hgrc
+++ b/contrib/examples/fix.hgrc
@@ -2,7 +2,7 @@ 
 clang-format:command = clang-format --style file
 clang-format:pattern = set:(**.c or **.cc or **.h) and not "include:contrib/clang-format-ignorelist"
 
-rustfmt:command = $(rustup which --toolchain nightly rustfmt)
+rustfmt:command = rustfmt +nightly
 rustfmt:pattern = set:**.rs
 
 black:command = black --config=black.toml -