parent
ad94fb1036
commit
bba4964e31
|
@ -469,7 +469,11 @@ fn post_process(config_file: &Path, json: json::Config) -> Result<Config, Box<Er
|
||||||
let rust_edition: RustEdition = {
|
let rust_edition: RustEdition = {
|
||||||
let mut buf = config_file.to_path_buf();
|
let mut buf = config_file.to_path_buf();
|
||||||
buf.pop();
|
buf.pop();
|
||||||
|
buf.push(&json.rust.dir);
|
||||||
buf.push("Cargo.toml");
|
buf.push("Cargo.toml");
|
||||||
|
if !buf.exists() {
|
||||||
|
return Err(format!("{} does not exist.", buf.display()).into());
|
||||||
|
}
|
||||||
let manifest: toml::Value = fs::read_to_string(&buf)?.parse()?;
|
let manifest: toml::Value = fs::read_to_string(&buf)?.parse()?;
|
||||||
manifest["package"]
|
manifest["package"]
|
||||||
.get("edition")
|
.get("edition")
|
||||||
|
|
Loading…
Reference in New Issue