mirror of
https://github.com/MrBeanCpp/MIT.git
synced 2026-04-29 05:09:47 +08:00
重新format,对use进行排序
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
use std::env;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::{
|
||||
env,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use colored::Colorize;
|
||||
|
||||
use crate::models::blob::Blob;
|
||||
use crate::models::index::{FileMetaData, Index};
|
||||
use crate::utils::util::{
|
||||
check_repo_exist, get_working_dir, is_inside_repo, is_inside_workdir, list_files, to_workdir_relative_path,
|
||||
ROOT_DIR,
|
||||
use crate::{
|
||||
models::{
|
||||
blob::Blob,
|
||||
index::{FileMetaData, Index},
|
||||
},
|
||||
utils::util::{
|
||||
check_repo_exist, get_working_dir, is_inside_repo, is_inside_workdir, list_files, to_workdir_relative_path,
|
||||
ROOT_DIR,
|
||||
},
|
||||
};
|
||||
|
||||
pub fn add(files: Vec<String>, all: bool, mut update: bool) {
|
||||
|
||||
@@ -127,8 +127,7 @@ pub fn branch(
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use crate::commands;
|
||||
use crate::utils::util;
|
||||
use crate::{commands, utils::util};
|
||||
#[test]
|
||||
fn test_create_branch() {
|
||||
util::setup_test_with_clean_mit();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
use crate::head;
|
||||
use crate::models::{commit, index};
|
||||
use crate::{
|
||||
head,
|
||||
models::{commit, index},
|
||||
};
|
||||
|
||||
use super::status;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use crate::models::index::Index;
|
||||
use crate::utils::util;
|
||||
use crate::utils::util::check_repo_exist;
|
||||
use crate::{
|
||||
models::index::Index,
|
||||
utils::{util, util::check_repo_exist},
|
||||
};
|
||||
use colored::Colorize;
|
||||
use std::path::PathBuf;
|
||||
use std::{fs, io};
|
||||
use std::{fs, io, path::PathBuf};
|
||||
|
||||
/// 从暂存区&|工作区删除文件
|
||||
pub fn remove(files: Vec<String>, cached: bool, recursive: bool) -> io::Result<()> {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use crate::head::Head;
|
||||
use crate::models::commit::Commit;
|
||||
use crate::models::index::Index;
|
||||
use crate::utils::util::check_repo_exist;
|
||||
use crate::{head, utils::util};
|
||||
use crate::{
|
||||
head,
|
||||
head::Head,
|
||||
models::{commit::Commit, index::Index},
|
||||
utils::{util, util::check_repo_exist},
|
||||
};
|
||||
use colored::Colorize;
|
||||
use std::path::PathBuf;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user