mirror of
https://github.com/MrBeanCpp/MIT.git
synced 2026-04-01 18:00:24 +08:00
清除警告
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
use crate::{head, models::commit::Commit};
|
||||
use colored::Colorize;
|
||||
use core::num;
|
||||
use std::option;
|
||||
|
||||
const DEFAULT_LOG_NUMBER: usize = 10;
|
||||
|
||||
@@ -40,26 +38,13 @@ pub fn __log(all: bool, number: Option<usize>) -> usize {
|
||||
if first {
|
||||
// TODO: (HEAD -> ttt, ad2)
|
||||
first = false;
|
||||
print!(
|
||||
"{}{}{}{}",
|
||||
"commit ".yellow(),
|
||||
commit.get_hash().yellow(),
|
||||
"(".yellow(),
|
||||
"HEAD".blue()
|
||||
);
|
||||
print!("{}{}{}{}", "commit ".yellow(), commit.get_hash().yellow(), "(".yellow(), "HEAD".blue());
|
||||
if let Some(ref branch_name) = branch_name {
|
||||
print!("{}", format!(" -> {}", branch_name).blue());
|
||||
}
|
||||
println!("{}", ")".yellow());
|
||||
} else {
|
||||
println!(
|
||||
"{}{}{}{}{}",
|
||||
"commit ".yellow(),
|
||||
head_commit.yellow(),
|
||||
"(".yellow(),
|
||||
"HEAD".blue(),
|
||||
")".yellow()
|
||||
);
|
||||
println!("{}{}{}{}{}", "commit ".yellow(), head_commit.yellow(), "(".yellow(), "HEAD".blue(), ")".yellow());
|
||||
}
|
||||
println!("Author: {}", commit.get_author());
|
||||
println!("Date: {}", commit.get_date());
|
||||
|
||||
@@ -2,7 +2,6 @@ use crate::models::blob::Blob;
|
||||
use crate::models::object::Hash;
|
||||
use crate::utils::util;
|
||||
use crate::utils::util::get_relative_path;
|
||||
use colored::Colorize;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashMap;
|
||||
use std::fs;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::models::object::{self, Hash};
|
||||
use crate::models::object::Hash;
|
||||
|
||||
use super::utils::util;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user