Remove unneeded Box::new

Co-Authored-By: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
Wilco Kusee 2020-01-08 17:22:08 +01:00 committed by GitHub
parent 738d5a7ec2
commit 11caebe6ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -372,7 +372,7 @@ fn find_cargo_toml(path: &Path) -> Result<PathBuf> {
}
curr = path.parent();
}
Err(Box::new(CargoTomlNotFoundError(path.to_path_buf())))
Err(CargoTomlNotFoundError(path.to_path_buf()))?
}
pub fn get_rustc_cfg_options() -> CfgOptions {