summary refs log tree commit diff
path: root/src/libserialize
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-01 23:53:35 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-03 23:43:57 -0800
commit7d8d06f86b48520814596bd5363d2b82bc619774 (patch)
treeeda093ca208286fd8679da8de9f3597b7a024c50 /src/libserialize
parent470118f3e915cdc8f936aca0640b28a7a3d8dc6c (diff)
downloadrust-7d8d06f86b48520814596bd5363d2b82bc619774.tar.gz
rust-7d8d06f86b48520814596bd5363d2b82bc619774.zip
Remove deprecated functionality
This removes a large array of deprecated functionality, regardless of how
recently it was deprecated. The purpose of this commit is to clean out the
standard libraries and compiler for the upcoming alpha release.

Some notable compiler changes were to enable warnings for all now-deprecated
command line arguments (previously the deprecated versions were silently
accepted) as well as removing deriving(Zero) entirely (the trait was removed).

The distribution no longer contains the libtime or libregex_macros crates. Both
of these have been deprecated for some time and are available externally.
Diffstat (limited to 'src/libserialize')
-rw-r--r--src/libserialize/base64.rs2
-rw-r--r--src/libserialize/json.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libserialize/base64.rs b/src/libserialize/base64.rs
index 52d5a1a3af5..44bf5f89778 100644
--- a/src/libserialize/base64.rs
+++ b/src/libserialize/base64.rs
@@ -396,7 +396,7 @@ mod tests {
 
         for _ in range(0u, 1000) {
             let times = thread_rng().gen_range(1u, 100);
-            let v = Vec::from_fn(times, |_| random::<u8>());
+            let v = thread_rng().gen_iter::<u8>().take(times).collect::<Vec<_>>();
             assert_eq!(v.to_base64(STANDARD)
                         .from_base64()
                         .unwrap(),
diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs
index 73f986a97ef..e31d8157332 100644
--- a/src/libserialize/json.rs
+++ b/src/libserialize/json.rs
@@ -2052,7 +2052,7 @@ macro_rules! read_primitive {
                 Json::F64(f) => Err(ExpectedError("Integer".to_string(), format!("{}", f))),
                 // re: #12967.. a type w/ numeric keys (ie HashMap<uint, V> etc)
                 // is going to have a string here, as per JSON spec.
-                Json::String(s) => match std::str::from_str(s.as_slice()) {
+                Json::String(s) => match s.parse() {
                     Some(f) => Ok(f),
                     None => Err(ExpectedError("Number".to_string(), s)),
                 },