style(commit-msg): code style format

This commit is contained in:
2020-07-12 17:55:11 +08:00
parent 69fd44e857
commit 27ce15e61a

View File

@@ -86,7 +86,6 @@ fn install_commit_msg(force: bool) {
}));
let commit_msg_crs = home_path.join("bin").join("commit-msg.crs");
let commig_msg_exec_file = if !commit_msg_crs.exists() {
//exit_with_error_message(&format!("File {:?} NOT exists!", commit_msg_crs));
print_warn(&format!("File {:?} NOT exists!", commit_msg_crs));
PathBuf::from(env::args().next().unwrap())
} else {
@@ -121,5 +120,5 @@ fn exit_with_error_message(msg: &str) -> ! { print_error(msg); exit_with_error()
fn print_info(msg: &str) { println!("{b}[INFO ]{e} {m}", b = BOLD, e = END, m = msg); }
fn print_ok(msg: &str) { println!("{g}{b}[OK ]{e} {g}{m}{e}", g = GREEN, b = BOLD, e = END, m = msg); }
fn print_warn(msg: &str) { println!("{y}{b}[WARN ]{e} {y}{m}{e}", y = YELLOW, b = BOLD, e = END, m = msg); }
fn print_warn(msg: &str) { println!("{y}{b}[WARN ]{e} {y}{m}{e}", y = YELLOW, b = BOLD, e = END, m = msg); }
fn print_error(msg: &str) { println!("{r}{b}[ERROR]{e} {r}{m}{e}", r = RED, b = BOLD, e = END, m = msg); }