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 5b7368c commit 13cc3acCopy full SHA for 13cc3ac
src/cmd.rs
@@ -74,12 +74,14 @@ impl CmdRunner {
74
bail!("The command `cargo metadata …` failed. Are you in the `rustlings/` directory?");
75
}
76
77
- let target_dir = serde_json::de::from_slice::<CargoMetadata>(&metadata_output.stdout)
+ let metadata: CargoMetadata = serde_json::de::from_slice(&metadata_output.stdout)
78
.context(
79
"Failed to read the field `target_directory` from the output of the command `cargo metadata …`",
80
- )?.target_directory;
+ )?;
81
82
- Ok(Self { target_dir })
+ Ok(Self {
83
+ target_dir: metadata.target_directory,
84
+ })
85
86
87
pub fn cargo<'out>(
0 commit comments