@@ -26,7 +26,7 @@ use std::str;
26
26
27
27
use build_helper:: { output, mtime, up_to_date} ;
28
28
use filetime:: FileTime ;
29
- use rustc_serialize :: json ;
29
+ use serde_json ;
30
30
31
31
use util:: { exe, libdir, is_dylib, copy} ;
32
32
use { Build , Compiler , Mode } ;
@@ -934,18 +934,18 @@ fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path) {
934
934
let stdout = BufReader :: new ( child. stdout . take ( ) . unwrap ( ) ) ;
935
935
for line in stdout. lines ( ) {
936
936
let line = t ! ( line) ;
937
- let json = if line. starts_with ( "{" ) {
938
- t ! ( line . parse :: <json :: Json > ( ) )
937
+ let json: serde_json :: Value = if line. starts_with ( "{" ) {
938
+ t ! ( serde_json :: from_str ( & line ) )
939
939
} else {
940
940
// If this was informational, just print it out and continue
941
941
println ! ( "{}" , line) ;
942
942
continue
943
943
} ;
944
- if json. find ( "reason" ) . and_then ( |j| j . as_string ( ) ) != Some ( "compiler-artifact" ) {
944
+ if json[ "reason" ] . as_str ( ) != Some ( "compiler-artifact" ) {
945
945
continue
946
946
}
947
947
for filename in json[ "filenames" ] . as_array ( ) . unwrap ( ) {
948
- let filename = filename. as_string ( ) . unwrap ( ) ;
948
+ let filename = filename. as_str ( ) . unwrap ( ) ;
949
949
// Skip files like executables
950
950
if !filename. ends_with ( ".rlib" ) &&
951
951
!filename. ends_with ( ".lib" ) &&
0 commit comments