()
| 2 | use devx_pre_commit::PreCommitContext; |
| 3 | |
| 4 | pub fn run_hook() -> Result<()> { |
| 5 | let ctx = PreCommitContext::from_git_diff(crate::project_root_dir())?; |
| 6 | ctx.rustfmt()?; |
| 7 | ctx.stage_new_changes()?; |
| 8 | Ok(()) |
| 9 | } |
| 10 | |
| 11 | pub fn install_hook() -> Result<()> { |
| 12 | devx_pre_commit::install_self_as_hook(crate::project_root_dir())?; |
no test coverage detected