diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-01 17:51:35 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-01 17:51:35 +0000 |
commit | 5efb7f85eb24c7ad76136a7d81e8f8cffe213aa8 (patch) | |
tree | 0795d7277733920361a260db1a65306f1a47e1ac /xtask/src/pre_commit.rs | |
parent | c17f2bf2a27798858ef2e3012ca28295aed46efa (diff) | |
parent | d9dcfd81c5d4325379ac88c4250b9c77ecbd75e8 (diff) |
Merge #7830
7830: Simplify xtask r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask/src/pre_commit.rs')
-rw-r--r-- | xtask/src/pre_commit.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xtask/src/pre_commit.rs b/xtask/src/pre_commit.rs index 8f2dbea19..b57cf3ce2 100644 --- a/xtask/src/pre_commit.rs +++ b/xtask/src/pre_commit.rs | |||
@@ -9,7 +9,7 @@ use crate::{project_root, run_rustfmt, Mode}; | |||
9 | 9 | ||
10 | // FIXME: if there are changed `.ts` files, also reformat TypeScript (by | 10 | // FIXME: if there are changed `.ts` files, also reformat TypeScript (by |
11 | // shelling out to `npm fmt`). | 11 | // shelling out to `npm fmt`). |
12 | pub fn run_hook() -> Result<()> { | 12 | pub(crate) fn run_hook() -> Result<()> { |
13 | run_rustfmt(Mode::Overwrite)?; | 13 | run_rustfmt(Mode::Overwrite)?; |
14 | 14 | ||
15 | let diff = cmd!("git diff --diff-filter=MAR --name-only --cached").read()?; | 15 | let diff = cmd!("git diff --diff-filter=MAR --name-only --cached").read()?; |
@@ -23,7 +23,7 @@ pub fn run_hook() -> Result<()> { | |||
23 | Ok(()) | 23 | Ok(()) |
24 | } | 24 | } |
25 | 25 | ||
26 | pub fn install_hook() -> Result<()> { | 26 | pub(crate) fn install_hook() -> Result<()> { |
27 | let hook_path: PathBuf = | 27 | let hook_path: PathBuf = |
28 | format!("./.git/hooks/pre-commit{}", std::env::consts::EXE_SUFFIX).into(); | 28 | format!("./.git/hooks/pre-commit{}", std::env::consts::EXE_SUFFIX).into(); |
29 | 29 | ||