mirror of
https://github.com/MrBeanCpp/MIT.git
synced 2026-02-07 12:24:46 +08:00
消除警告
This commit is contained in:
@@ -25,10 +25,13 @@ pub fn add(files: Vec<String>, all: bool, mut update: bool) {
|
||||
let path = if all || update {
|
||||
println!("{}", "--all || --update 运行于工作区目录".bright_green());
|
||||
get_working_dir().unwrap()
|
||||
} else {
|
||||
} else if dot {
|
||||
println!("{}", "'.'代表了当前目录".bright_green());
|
||||
env::current_dir().unwrap()
|
||||
} else {
|
||||
panic!("不应该运行到这里");
|
||||
};
|
||||
|
||||
println!("Working on [{}]\n", path.to_str().unwrap().bright_blue());
|
||||
files = list_files(&path).unwrap();
|
||||
if update {
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::path::PathBuf;
|
||||
use crate::utils::util::to_workdir_absolute_path;
|
||||
use crate::{
|
||||
head,
|
||||
models::{blob, commit, index},
|
||||
models::{commit, index},
|
||||
utils::util,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user