From 500a1de45cfbf8bb491b50e8a87cd9af0a1f0c1e Mon Sep 17 00:00:00 2001 From: HouXiaoxuan Date: Thu, 21 Dec 2023 01:48:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96panic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/index.rs | 1 - src/utils/util.rs | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/index.rs b/src/models/index.rs index 053f277..8ed5bb9 100644 --- a/src/models/index.rs +++ b/src/models/index.rs @@ -168,7 +168,6 @@ impl Index { /** 获取跟踪的文件列表 */ pub fn get_tracked_files(&self) -> Vec { - // XXX 测试版本,有待修改 let mut files = Vec::new(); self.entries.keys().for_each(|file| { if file.exists() { diff --git a/src/utils/util.rs b/src/utils/util.rs index 983415b..46c6771 100644 --- a/src/utils/util.rs +++ b/src/utils/util.rs @@ -1,3 +1,4 @@ +use chrono::format::format; use sha1::{Digest, Sha1}; use std::io::Write; use std::path::{Path, PathBuf}; @@ -108,7 +109,7 @@ pub fn get_storage_path() -> Result { if !current_dir.pop() { return Err(io::Error::new( io::ErrorKind::NotFound, - "Not a git repository", + format!("{:?} is not a git repository", std::env::current_dir()?), )); } }