aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/lib.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-17 14:50:13 +0100
committerGitHub <[email protected]>2020-08-17 14:50:13 +0100
commitdf225472762c92aec3c991a3d0f78bad5058a39b (patch)
tree75688579e050261973baea316f286b5916b5b761 /xtask/src/lib.rs
parent0b2b9a5508186c16a2e782f47ce7e0e1c5fb8d33 (diff)
parentb82d967182d29f1302187fa0e3a56661d0c4082a (diff)
Merge #5784
5784: Mention that generated .adocs are generaterd r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask/src/lib.rs')
-rw-r--r--xtask/src/lib.rs11
1 files changed, 0 insertions, 11 deletions
diff --git a/xtask/src/lib.rs b/xtask/src/lib.rs
index 807ef587c..f3ad81ba7 100644
--- a/xtask/src/lib.rs
+++ b/xtask/src/lib.rs
@@ -62,17 +62,6 @@ pub fn run_rustfmt(mode: Mode) -> Result<()> {
62 Ok(()) 62 Ok(())
63} 63}
64 64
65fn reformat(text: impl std::fmt::Display) -> Result<String> {
66 let _e = pushenv("RUSTUP_TOOLCHAIN", "stable");
67 ensure_rustfmt()?;
68 let stdout = run!(
69 "rustfmt --config-path {} --config fn_single_line=true", project_root().join("rustfmt.toml").display();
70 <text.to_string().as_bytes()
71 )?;
72 let preamble = "Generated file, do not edit by hand, see `xtask/src/codegen`";
73 Ok(format!("//! {}\n\n{}\n", preamble, stdout))
74}
75
76fn ensure_rustfmt() -> Result<()> { 65fn ensure_rustfmt() -> Result<()> {
77 let out = run!("rustfmt --version")?; 66 let out = run!("rustfmt --version")?;
78 if !out.contains("stable") { 67 if !out.contains("stable") {