@@ -35,7 +35,8 @@ use std::io::File;
35
35
use std:: io;
36
36
use std:: rc:: Rc ;
37
37
use externalfiles:: ExternalHtml ;
38
- use serialize:: { json, Decodable , Encodable } ;
38
+ use serialize:: { Decodable , Encodable } ;
39
+ use serialize:: json:: { mod, Json } ;
39
40
40
41
// reexported from `clean` so it can be easily updated with the mod itself
41
42
pub use clean:: SCHEMA_VERSION ;
@@ -425,11 +426,11 @@ fn json_input(input: &str) -> Result<Output, String> {
425
426
} ;
426
427
match json:: from_reader ( & mut input) {
427
428
Err ( s) => Err ( s. to_string ( ) ) ,
428
- Ok ( json :: Object ( obj) ) => {
429
+ Ok ( Json :: Object ( obj) ) => {
429
430
let mut obj = obj;
430
431
// Make sure the schema is what we expect
431
432
match obj. remove ( & "schema" . to_string ( ) ) {
432
- Some ( json :: String ( version) ) => {
433
+ Some ( Json :: String ( version) ) => {
433
434
if version. as_slice ( ) != SCHEMA_VERSION {
434
435
return Err ( format ! (
435
436
"sorry, but I only understand version {}" ,
@@ -468,7 +469,7 @@ fn json_output(krate: clean::Crate, res: Vec<plugins::PluginJson> ,
468
469
// "plugins": { output of plugins ... }
469
470
// }
470
471
let mut json = std:: collections:: TreeMap :: new ( ) ;
471
- json. insert ( "schema" . to_string ( ) , json :: String ( SCHEMA_VERSION . to_string ( ) ) ) ;
472
+ json. insert ( "schema" . to_string ( ) , Json :: String ( SCHEMA_VERSION . to_string ( ) ) ) ;
472
473
let plugins_json = res. into_iter ( )
473
474
. filter_map ( |opt| {
474
475
match opt {
@@ -495,8 +496,8 @@ fn json_output(krate: clean::Crate, res: Vec<plugins::PluginJson> ,
495
496
} ;
496
497
497
498
json. insert ( "crate" . to_string ( ) , crate_json) ;
498
- json. insert ( "plugins" . to_string ( ) , json :: Object ( plugins_json) ) ;
499
+ json. insert ( "plugins" . to_string ( ) , Json :: Object ( plugins_json) ) ;
499
500
500
501
let mut file = try!( File :: create ( & dst) ) ;
501
- json :: Object ( json) . to_writer ( & mut file)
502
+ Json :: Object ( json) . to_writer ( & mut file)
502
503
}
0 commit comments