diff options
Diffstat (limited to 'xtask')
-rw-r--r-- | xtask/src/install.rs | 4 | ||||
-rw-r--r-- | xtask/src/lib.rs | 8 | ||||
-rw-r--r-- | xtask/src/pre_commit.rs | 2 |
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 | ||
3 | use std::{env, path::PathBuf, str}; | 3 | use std::{env, path::PathBuf, str}; |
4 | 4 | ||
5 | use anyhow::{Context, Result}; | 5 | use anyhow::{Context, Result}; |
6 | 6 | ||
7 | use crate::{run, run_with_output, Cmd}; | 7 | use 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. |
10 | const REQUIRED_RUST_VERSION: u32 = 40; | 10 | const 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 | ||
3 | mod cmd; | 3 | mod cmd; |
4 | pub mod codegen; | ||
5 | pub mod install; | 4 | pub mod install; |
6 | pub mod pre_commit; | 5 | pub mod pre_commit; |
6 | |||
7 | pub mod codegen; | ||
7 | mod ast_src; | 8 | mod ast_src; |
8 | 9 | ||
9 | use anyhow::Context; | 10 | use anyhow::Context; |
@@ -13,10 +14,9 @@ use std::{ | |||
13 | process::{Command, Stdio}, | 14 | process::{Command, Stdio}, |
14 | }; | 15 | }; |
15 | 16 | ||
16 | use crate::codegen::Mode; | 17 | use crate::{cmd::run, codegen::Mode}; |
17 | 18 | ||
18 | pub use anyhow::Result; | 19 | pub use anyhow::Result; |
19 | pub use cmd::{run, run_with_output, Cmd}; | ||
20 | 20 | ||
21 | const TOOLCHAIN: &str = "stable"; | 21 | const TOOLCHAIN: &str = "stable"; |
22 | 22 | ||
@@ -83,7 +83,7 @@ pub fn run_clippy() -> Result<()> { | |||
83 | Ok(()) | 83 | Ok(()) |
84 | } | 84 | } |
85 | 85 | ||
86 | pub fn install_clippy() -> Result<()> { | 86 | fn 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 | ||
5 | use anyhow::{bail, Result}; | 5 | use anyhow::{bail, Result}; |
6 | 6 | ||
7 | use crate::{project_root, run, run_rustfmt, run_with_output, Mode}; | 7 | use 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`). |