SQVWP4LU7AAJSEIHK5CNNUK3XBUVT3FGIJIOPTKMR53PO2P4ARNQC
B3QWIGDERNMB3M6P5WTWP5CN2DB3KCS7MVTEPC2XVJ237ZXVQGMAC
RGJWLQWBXOOQF5KO3SVDRYNE3T5SAQYBWCCDCKGRZXFXIDBUIXMAC
LYTVEPH3W5UHF7MAYFWBT6NVNC42HEVKJGGMFDKUDZDNDOI33YJQC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
let path_ = path.clone();
let repo_path = RepoPath::new(path.clone()); let repo_path_ = repo_path.clone();
let repo_path = RepoPath::new(path.clone());
let repo_path_ = repo_path.clone();
std::fs::remove_dir_all(&path_).unwrap_or(());
if repo_path_.remove { std::fs::remove_dir_all(&repo_path_.path).unwrap_or(()); }
if repo_path_.remove {
std::fs::remove_dir_all(&repo_path_.path).unwrap_or(());
}
let mut repo = Repository::init(Some(path.clone()))?; let repo_path = RepoPath(path);
let mut repo = Repository::init(Some(path.clone()))?;
let repo_path = RepoPath(path);
let mut repo = Repository::init(Some(path))?;
struct RepoPath(PathBuf);
#[derive(Debug, Clone)]struct RepoPath { path: PathBuf, remove: bool,}impl RepoPath { fn new(path: PathBuf) -> Self { RepoPath { remove: std::fs::metadata(&path).is_err(), path, } }}
#[derive(Debug, Clone)]
struct RepoPath {
path: PathBuf,
remove: bool,
impl RepoPath {
fn new(path: PathBuf) -> Self {
RepoPath {
remove: std::fs::metadata(&path).is_err(),
path,
std::fs::remove_dir_all(&self.0).unwrap_or(());
if self.remove { std::fs::remove_dir_all(&self.path).unwrap_or(()); }
if self.remove {
std::fs::remove_dir_all(&self.path).unwrap_or(());