Skip to content

Commit

Permalink
unuse dirs create, compiler-error some platforms (like freebsd)
Browse files Browse the repository at this point in the history
  • Loading branch information
SerhoLiu committed Aug 3, 2018
1 parent ab16e4e commit a973f7a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 15 deletions.
11 changes: 0 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ toml = "0.4"
serde = "1.0"
serde_derive = "1.0"
mio = "0.6"
dirs = "1"
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
extern crate ansi_term;
extern crate dirs;
extern crate env_logger;
#[macro_use]
extern crate futures;
Expand Down
3 changes: 1 addition & 2 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use std::io::{self, Write};
use std::path::MAIN_SEPARATOR;

use ansi_term::Color;
use dirs;
use env_logger::{Builder, Formatter};
use log::{Level, LevelFilter, Record};
use ring::rand::{SecureRandom, SystemRandom};
Expand Down Expand Up @@ -118,7 +117,7 @@ pub fn expand_tilde_path(path: &str) -> Cow<str> {
|| path_after_tilde.starts_with('/')
|| path_after_tilde.starts_with(MAIN_SEPARATOR)
{
if let Some(hd) = dirs::home_dir() {
if let Some(hd) = env::home_dir() {
let result = format!("{}{}", hd.display(), path_after_tilde);
result.into()
} else {
Expand Down

0 comments on commit a973f7a

Please sign in to comment.