diff --git a/src/client/data/config.rs b/src/client/data/config.rs index e51aa89..b81854a 100644 --- a/src/client/data/config.rs +++ b/src/client/data/config.rs @@ -6,6 +6,7 @@ use std::error::Error as StdError; use std::fs::File; use std::io::prelude::*; use std::io::{Error, ErrorKind, Result}; +use std::path::Path; use rustc_serialize::json::decode; /// Configuration data. @@ -65,7 +66,7 @@ pub struct Config { impl Config { /// Loads a JSON configuration from the desired path. #[stable] - pub fn load(path: Path) -> Result { + pub fn load(path: &Path) -> Result { let mut file = try!(File::open(&path)); let mut data = String::new(); try!(file.read_to_string(&mut data)); diff --git a/src/lib.rs b/src/lib.rs index b55661f..ed1c9d4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,7 @@ #![unstable] #![warn(missing_docs)] -#![feature(collections, core, fs, io, net, old_path)] +#![feature(collections, core, io, net, path)] #[cfg(feature = "ctcp")] extern crate time; #[cfg(feature = "encode")] extern crate encoding; extern crate "rustc-serialize" as rustc_serialize;