From e6f7a8667b808e809a147b0781cd8b0d2b55bd7f Mon Sep 17 00:00:00 2001 From: Jonathan Dahan Date: Thu, 12 Sep 2019 19:40:54 -0400 Subject: [PATCH] cargo fmt --- src/main.rs | 2 +- src/plugins.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5bfff16..a51d507 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,10 +5,10 @@ //! * downloads the code from those repos //! * and generates an init.zsh to setup paths and load zsh scripts for your zshrc //! +use dirs::cache_dir; use std::env; use std::io::{self, Read, Result}; use std::path::PathBuf; -use dirs::cache_dir; pub mod identifier; pub mod plugin; diff --git a/src/plugins.rs b/src/plugins.rs index e8b8853..6ce8681 100644 --- a/src/plugins.rs +++ b/src/plugins.rs @@ -1,7 +1,7 @@ -use std::io::Error; -use std::path::PathBuf; use std::fmt; use std::fs::create_dir_all; +use std::io::Error; +use std::path::PathBuf; use git2_credentials::CredentialHandler; @@ -50,7 +50,7 @@ impl Plugins { } pub fn new(cache: &PathBuf) -> Plugins { - if ! cache.exists() { + if !cache.exists() { create_dir_all(&cache).expect("failed to create the cache directory"); } Plugins {