From 986b1f62d3f59f9fdd23925e444d4828421d5c23 Mon Sep 17 00:00:00 2001 From: Gary Yu Date: Sun, 16 Sep 2018 00:56:09 +0800 Subject: [PATCH] fix: deprecated warning for env::home_dir, after upgrading to rust 1.29.0 (#1533) --- config/Cargo.toml | 2 +- config/src/config.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/Cargo.toml b/config/Cargo.toml index 887ded116..ed03b0f8e 100644 --- a/config/Cargo.toml +++ b/config/Cargo.toml @@ -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" } diff --git a/config/src/config.rs b/config/src/config.rs index 36bf7933f..cbe084090 100644 --- a/config/src/config.rs +++ b/config/src/config.rs @@ -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 { // Check if grin dir exists let grin_path = { - match env::home_dir() { + match dirs::home_dir() { Some(mut p) => { p.push(GRIN_HOME); p