diff --git a/src/commands/log.rs b/src/commands/log.rs index 59e8264..4b32fc9 100644 --- a/src/commands/log.rs +++ b/src/commands/log.rs @@ -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 { 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()); diff --git a/src/models/index.rs b/src/models/index.rs index dd7aef5..5cb055c 100644 --- a/src/models/index.rs +++ b/src/models/index.rs @@ -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; diff --git a/src/store.rs b/src/store.rs index 3dc6bd1..265d465 100644 --- a/src/store.rs +++ b/src/store.rs @@ -1,6 +1,6 @@ use std::path::PathBuf; -use crate::models::object::{self, Hash}; +use crate::models::object::Hash; use super::utils::util;