Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit 0bdfd5d

Browse files
committed
Merge pull request #87 from lambda/beta-fixes
Beta fixes
2 parents a3a6172 + 9fd25af commit 0bdfd5d

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ support for hex, base64, and json encoding and decoding.
1515
"""
1616

1717
[dev-dependencies]
18-
rand = "0.2"
18+
rand = "0.3"

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
//! Support code for encoding and decoding types.
1212
13-
#![feature(convert)]
1413
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
1514
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
1615
html_root_url = "http://doc.rust-lang.org/rustc-serialize/")]

src/serialize.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -570,14 +570,18 @@ impl Decodable for path::PathBuf {
570570
use std::os::unix::prelude::*;
571571
let bytes: Vec<u8> = try!(Decodable::decode(d));
572572
let s: OsString = OsStringExt::from_vec(bytes);
573-
Ok(path::PathBuf::from(s))
573+
let mut p = path::PathBuf::new();
574+
p.push(s);
575+
Ok(p)
574576
}
575577
#[cfg(windows)]
576578
fn decode<D: Decoder>(d: &mut D) -> Result<path::PathBuf, D::Error> {
577579
use std::os::windows::prelude::*;
578580
let bytes: Vec<u16> = try!(Decodable::decode(d));
579581
let s: OsString = OsStringExt::from_wide(&bytes);
580-
Ok(path::PathBuf::from(s))
582+
let mut p = PathBuf::new();
583+
p.push(s);
584+
Ok(p)
581585
}
582586
}
583587

0 commit comments

Comments
 (0)