about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2017-07-04 07:31:05 -0600
committerMark Simulacrum <mark.simulacrum@gmail.com>2017-07-20 11:23:59 -0600
commitd360af45bb2dda3f0f0fddbb130967dc06a2dd54 (patch)
tree38a8bd29077c6ff73e4bb09be74594f3055dba5c /src
parentd812d430a4a90a8ed3e5cf50387ea9a25ede4e97 (diff)
downloadrust-d360af45bb2dda3f0f0fddbb130967dc06a2dd54.tar.gz
rust-d360af45bb2dda3f0f0fddbb130967dc06a2dd54.zip
Migrate to serde_json entirely
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/compile.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index ab4eec0199f..79668efc078 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -26,7 +26,7 @@ use std::str;
 
 use build_helper::{output, mtime, up_to_date};
 use filetime::FileTime;
-use rustc_serialize::json;
+use serde_json;
 
 use util::{exe, libdir, is_dylib, copy};
 use {Build, Compiler, Mode};
@@ -934,18 +934,18 @@ fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path) {
     let stdout = BufReader::new(child.stdout.take().unwrap());
     for line in stdout.lines() {
         let line = t!(line);
-        let json = if line.starts_with("{") {
-            t!(line.parse::<json::Json>())
+        let json: serde_json::Value = if line.starts_with("{") {
+            t!(serde_json::from_str(&line))
         } else {
             // If this was informational, just print it out and continue
             println!("{}", line);
             continue
         };
-        if json.find("reason").and_then(|j| j.as_string()) != Some("compiler-artifact") {
+        if json["reason"].as_str() != Some("compiler-artifact") {
             continue
         }
         for filename in json["filenames"].as_array().unwrap() {
-            let filename = filename.as_string().unwrap();
+            let filename = filename.as_str().unwrap();
             // Skip files like executables
             if !filename.ends_with(".rlib") &&
                !filename.ends_with(".lib") &&