summaryrefslogtreecommitdiff
path: root/src/libserialize/serialize.rs
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2015-01-29 14:03:36 -0800
committerAaron Turon <aturon@mozilla.com>2015-02-03 14:34:42 -0800
commit3e39f0bc0e96f76610104918edaa5912f4f352df (patch)
tree19f32ce01fd97eb21b2e272a260f32a0dba6d499 /src/libserialize/serialize.rs
parent3b2ed14906fd9f9daa27cc7d1dad263d2f5ff450 (diff)
downloadrust-3e39f0bc0e96f76610104918edaa5912f4f352df.tar.gz
Rename std::path to std::old_path
As part of [RFC 474](https://github.com/rust-lang/rfcs/pull/474), this commit renames `std::path` to `std::old_path`, leaving the existing path API in place to ease migration to the new one. Updating should be as simple as adjusting imports, and the prelude still maps to the old path APIs for now. [breaking-change]
Diffstat (limited to 'src/libserialize/serialize.rs')
-rw-r--r--src/libserialize/serialize.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libserialize/serialize.rs b/src/libserialize/serialize.rs
index 3d7c91ad188..517907bcf58 100644
--- a/src/libserialize/serialize.rs
+++ b/src/libserialize/serialize.rs
@@ -14,7 +14,7 @@
Core encoding and decoding interfaces.
*/
-use std::path;
+use std::old_path;
use std::rc::Rc;
use std::cell::{Cell, RefCell};
use std::sync::Arc;
@@ -538,29 +538,29 @@ macro_rules! tuple {
tuple! { T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, }
-impl Encodable for path::posix::Path {
+impl Encodable for old_path::posix::Path {
fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> {
self.as_vec().encode(e)
}
}
-impl Decodable for path::posix::Path {
- fn decode<D: Decoder>(d: &mut D) -> Result<path::posix::Path, D::Error> {
+impl Decodable for old_path::posix::Path {
+ fn decode<D: Decoder>(d: &mut D) -> Result<old_path::posix::Path, D::Error> {
let bytes: Vec<u8> = try!(Decodable::decode(d));
- Ok(path::posix::Path::new(bytes))
+ Ok(old_path::posix::Path::new(bytes))
}
}
-impl Encodable for path::windows::Path {
+impl Encodable for old_path::windows::Path {
fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> {
self.as_vec().encode(e)
}
}
-impl Decodable for path::windows::Path {
- fn decode<D: Decoder>(d: &mut D) -> Result<path::windows::Path, D::Error> {
+impl Decodable for old_path::windows::Path {
+ fn decode<D: Decoder>(d: &mut D) -> Result<old_path::windows::Path, D::Error> {
let bytes: Vec<u8> = try!(Decodable::decode(d));
- Ok(path::windows::Path::new(bytes))
+ Ok(old_path::windows::Path::new(bytes))
}
}