mirror of
https://github.com/MrBeanCpp/MIT.git
synced 2026-05-01 06:09:59 +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 {
|
let path = if all || update {
|
||||||
println!("{}", "--all || --update 运行于工作区目录".bright_green());
|
println!("{}", "--all || --update 运行于工作区目录".bright_green());
|
||||||
get_working_dir().unwrap()
|
get_working_dir().unwrap()
|
||||||
} else {
|
} else if dot {
|
||||||
println!("{}", "'.'代表了当前目录".bright_green());
|
println!("{}", "'.'代表了当前目录".bright_green());
|
||||||
env::current_dir().unwrap()
|
env::current_dir().unwrap()
|
||||||
|
} else {
|
||||||
|
panic!("不应该运行到这里");
|
||||||
};
|
};
|
||||||
|
|
||||||
println!("Working on [{}]\n", path.to_str().unwrap().bright_blue());
|
println!("Working on [{}]\n", path.to_str().unwrap().bright_blue());
|
||||||
files = list_files(&path).unwrap();
|
files = list_files(&path).unwrap();
|
||||||
if update {
|
if update {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use std::path::PathBuf;
|
|||||||
use crate::utils::util::to_workdir_absolute_path;
|
use crate::utils::util::to_workdir_absolute_path;
|
||||||
use crate::{
|
use crate::{
|
||||||
head,
|
head,
|
||||||
models::{blob, commit, index},
|
models::{commit, index},
|
||||||
utils::util,
|
utils::util,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user