aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-01-07 14:33:51 +0000
committerAleksey Kladov <[email protected]>2020-01-07 14:36:43 +0000
commit5e7995eeb7b7ab4cf0d80ddfa2d20e506216f895 (patch)
tree725563d5683490184d05f268c845adf2cf83a679
parent64f0510d18bc62c6bbe6f3c7d4b0d43665ccc1eb (diff)
Cleanup
-rw-r--r--xtask/src/install.rs4
-rw-r--r--xtask/src/lib.rs8
-rw-r--r--xtask/src/pre_commit.rs2
3 files changed, 7 insertions, 7 deletions
diff --git a/xtask/src/install.rs b/xtask/src/install.rs
index ab6ed92f7..c5bb7351a 100644
--- a/xtask/src/install.rs
+++ b/xtask/src/install.rs
@@ -1,10 +1,10 @@
1//! Installs rust-analyzer langauge server and/or editor plugin. 1//! Installs rust-analyzer language server and/or editor plugin.
2 2
3use std::{env, path::PathBuf, str}; 3use std::{env, path::PathBuf, str};
4 4
5use anyhow::{Context, Result}; 5use anyhow::{Context, Result};
6 6
7use crate::{run, run_with_output, Cmd}; 7use crate::cmd::{run, run_with_output, Cmd};
8 8
9// Latest stable, feel free to send a PR if this lags behind. 9// Latest stable, feel free to send a PR if this lags behind.
10const REQUIRED_RUST_VERSION: u32 = 40; 10const REQUIRED_RUST_VERSION: u32 = 40;
diff --git a/xtask/src/lib.rs b/xtask/src/lib.rs
index 7bfc4a285..b76278635 100644
--- a/xtask/src/lib.rs
+++ b/xtask/src/lib.rs
@@ -1,9 +1,10 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3mod cmd; 3mod cmd;
4pub mod codegen;
5pub mod install; 4pub mod install;
6pub mod pre_commit; 5pub mod pre_commit;
6
7pub mod codegen;
7mod ast_src; 8mod ast_src;
8 9
9use anyhow::Context; 10use anyhow::Context;
@@ -13,10 +14,9 @@ use std::{
13 process::{Command, Stdio}, 14 process::{Command, Stdio},
14}; 15};
15 16
16use crate::codegen::Mode; 17use crate::{cmd::run, codegen::Mode};
17 18
18pub use anyhow::Result; 19pub use anyhow::Result;
19pub use cmd::{run, run_with_output, Cmd};
20 20
21const TOOLCHAIN: &str = "stable"; 21const TOOLCHAIN: &str = "stable";
22 22
@@ -83,7 +83,7 @@ pub fn run_clippy() -> Result<()> {
83 Ok(()) 83 Ok(())
84} 84}
85 85
86pub fn install_clippy() -> Result<()> { 86fn install_clippy() -> Result<()> {
87 run(&format!("rustup toolchain install {}", TOOLCHAIN), ".")?; 87 run(&format!("rustup toolchain install {}", TOOLCHAIN), ".")?;
88 run(&format!("rustup component add clippy --toolchain {}", TOOLCHAIN), ".") 88 run(&format!("rustup component add clippy --toolchain {}", TOOLCHAIN), ".")
89} 89}
diff --git a/xtask/src/pre_commit.rs b/xtask/src/pre_commit.rs
index 7984ba963..88e868ca6 100644
--- a/xtask/src/pre_commit.rs
+++ b/xtask/src/pre_commit.rs
@@ -4,7 +4,7 @@ use std::{fs, path::PathBuf};
4 4
5use anyhow::{bail, Result}; 5use anyhow::{bail, Result};
6 6
7use crate::{project_root, run, run_rustfmt, run_with_output, Mode}; 7use crate::{cmd::run_with_output, project_root, run, run_rustfmt, Mode};
8 8
9// FIXME: if there are changed `.ts` files, also reformat TypeScript (by 9// FIXME: if there are changed `.ts` files, also reformat TypeScript (by
10// shelling out to `npm fmt`). 10// shelling out to `npm fmt`).