9588: minor: make sure that project_root works correctly r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2021-07-13 12:02:52 +00:00 committed by GitHub
commit 098a8e7b2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,5 +191,7 @@ fn normalize_newlines(s: &str) -> String {
pub fn project_root() -> PathBuf {
let dir = env!("CARGO_MANIFEST_DIR");
PathBuf::from(dir).parent().unwrap().parent().unwrap().to_owned()
let res = PathBuf::from(dir).parent().unwrap().parent().unwrap().to_owned();
assert!(res.join("bors.toml").exists());
res
}