fix: deprecated warning for env::home_dir, after upgrading to rust 1.29.0 (#1533)

This commit is contained in:
Gary Yu 2018-09-16 00:56:09 +08:00 committed by Ignotus Peverell
parent 2c712fefff
commit 986b1f62d3
2 changed files with 3 additions and 2 deletions

View file

@ -9,7 +9,7 @@ publish = false
serde = "1"
serde_derive = "1"
toml = "0.4"
dirs = "1"
dirs = "1.0.3"
grin_servers = { path = "../servers" }
grin_p2p = { path = "../p2p" }

View file

@ -14,6 +14,7 @@
//! Configuration file management
use dirs;
use std::env;
use std::fs::{self, File};
use std::io::prelude::*;
@ -43,7 +44,7 @@ const GRIN_WALLET_DIR: &'static str = "wallet_data";
fn get_grin_path() -> Result<PathBuf, ConfigError> {
// Check if grin dir exists
let grin_path = {
match env::home_dir() {
match dirs::home_dir() {
Some(mut p) => {
p.push(GRIN_HOME);
p