We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94d274d commit 71f8173Copy full SHA for 71f8173
src/cargo/core/compiler/unit_graph.rs
@@ -10,7 +10,6 @@ use crate::util::interning::InternedString;
10
use crate::util::CargoResult;
11
use crate::GlobalContext;
12
use std::collections::HashMap;
13
-use std::io::Write;
14
15
/// The dependency graph of Units.
16
pub type UnitGraph = HashMap<Unit, Vec<UnitDep>>;
@@ -121,15 +120,10 @@ pub fn emit_serialized_unit_graph(
121
120
}
122
})
123
.collect();
124
- let s = SerializedUnitGraph {
+
+ gctx.shell().print_json(&SerializedUnitGraph {
125
version: VERSION,
126
units: ser_units,
127
roots,
128
- };
129
-
130
- let stdout = std::io::stdout();
131
- let mut lock = stdout.lock();
132
- serde_json::to_writer(&mut lock, &s)?;
133
- drop(writeln!(lock));
134
- Ok(())
+ })
135
0 commit comments