mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Merge #9588
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:
commit
098a8e7b2f
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue