diff options
| author | Yuri Astrakhan <YuriAstrakhan@gmail.com> | 2022-09-23 22:20:42 -0400 |
|---|---|---|
| committer | Yuri Astrakhan <YuriAstrakhan@gmail.com> | 2022-09-23 23:08:12 -0400 |
| commit | cc6b375cd3edcee65adc6a7aa3e45a7a50fe8112 (patch) | |
| tree | 55273409bda3af5fc178ef4371cab53c0426a74b /clippy_dev/src/setup/git_hook.rs | |
| parent | c2d426650b6eef2b22a36776ecf7096f9d950b7c (diff) | |
| download | rust-cc6b375cd3edcee65adc6a7aa3e45a7a50fe8112.tar.gz rust-cc6b375cd3edcee65adc6a7aa3e45a7a50fe8112.zip | |
fallout2: rework clippy_dev & _lints fmt inlining
* Inline format args where possible * simplify a few complex macros into format str * use formatdoc!() instead format!(indoc!(...))
Diffstat (limited to 'clippy_dev/src/setup/git_hook.rs')
| -rw-r--r-- | clippy_dev/src/setup/git_hook.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clippy_dev/src/setup/git_hook.rs b/clippy_dev/src/setup/git_hook.rs index 3fbb77d5923..1de5b1940ba 100644 --- a/clippy_dev/src/setup/git_hook.rs +++ b/clippy_dev/src/setup/git_hook.rs @@ -30,10 +30,7 @@ pub fn install_hook(force_override: bool) { println!("info: the hook can be removed with `cargo dev remove git-hook`"); println!("git hook successfully installed"); }, - Err(err) => eprintln!( - "error: unable to copy `{}` to `{}` ({})", - HOOK_SOURCE_FILE, HOOK_TARGET_FILE, err - ), + Err(err) => eprintln!("error: unable to copy `{HOOK_SOURCE_FILE}` to `{HOOK_TARGET_FILE}` ({err})"), } } @@ -77,7 +74,7 @@ pub fn remove_hook() { fn delete_git_hook_file(path: &Path) -> bool { if let Err(err) = fs::remove_file(path) { - eprintln!("error: unable to delete existing pre-commit git hook ({})", err); + eprintln!("error: unable to delete existing pre-commit git hook ({err})"); false } else { true |
