Skip to content

Commit 868680f

Browse files
author
Paolo Tranquilli
committed
Merge branch 'redsun82/rust-fix-member-aggregation' into redsun82/rust-pick-edition
2 parents dbbd80f + 60aa3a8 commit 868680f

27 files changed

+5
-3
lines changed

rust/extractor/src/rust_analyzer.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,10 @@ impl TomlReader {
174174
}
175175

176176
fn workspace_members_match(workspace_dir: &AbsPath, members: &[String], target: &AbsPath) -> bool {
177-
members.iter().any(|p| {
178-
glob::Pattern::new(workspace_dir.join(p).as_str()).is_ok_and(|p| p.matches(target.as_str()))
177+
target.strip_prefix(workspace_dir).is_some_and(|rel_path| {
178+
members
179+
.iter()
180+
.any(|p| glob::Pattern::new(p).is_ok_and(|p| p.matches(rel_path.as_str())))
179181
})
180182
}
181183

rust/ql/integration-tests/hello-workspace/rust-project.json renamed to rust/ql/integration-tests/hello-[workspace]/rust-project.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
"deps": []
2222
}
2323
]
24-
}
24+
}

0 commit comments

Comments
 (0)