diff rust/hgcli/build.rs @ 45620:426294d06ddc

rust: move rustfmt.toml to repo root so it can be used by `hg fix` `hg fix` runs the formatters from the repo root so it doesn't pick up the `rustfmt.toml` configs we had in each the `hg-core`, `hg-cpython`, and `rhg` packages, which resulted in warnings about `async fn` not existing in Rust 2015. This patch moves the `rustfmt.toml` file to the root so `hg fix` will use it. By putting the `rustfmt.toml` file in a higher-level directory, it also applies to the `chg` and `hgcli` packages. That makes `test-check-rust-format.t` fail, so this patch also applies the new formatting rules to those packages. Differential Revision: https://phab.mercurial-scm.org/D9142
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 01 Oct 2020 09:09:35 -0700
parents 26ce8e751503
children
line wrap: on
line diff
--- a/rust/hgcli/build.rs	Wed Sep 30 18:07:21 2020 +0530
+++ b/rust/hgcli/build.rs	Thu Oct 01 09:09:35 2020 -0700
@@ -5,7 +5,9 @@
 /*! Build script to integrate PyOxidizer. */
 
 fn main() {
-    if let Ok(config_rs) = std::env::var("DEP_PYTHONXY_DEFAULT_PYTHON_CONFIG_RS") {
+    if let Ok(config_rs) =
+        std::env::var("DEP_PYTHONXY_DEFAULT_PYTHON_CONFIG_RS")
+    {
         println!(
             "cargo:rustc-env=PYOXIDIZER_DEFAULT_PYTHON_CONFIG_RS={}",
             config_rs