Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/test-fixture/src/lib.rs')
-rw-r--r--crates/test-fixture/src/lib.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/test-fixture/src/lib.rs b/crates/test-fixture/src/lib.rs
index 03e85a898a..faf9d22047 100644
--- a/crates/test-fixture/src/lib.rs
+++ b/crates/test-fixture/src/lib.rs
@@ -95,8 +95,10 @@ pub trait WithFixture: Default + ExpandDatabase + SourceRootDatabase + 'static {
fn test_crate(&self) -> CrateId {
let crate_graph = self.crate_graph();
let mut it = crate_graph.iter();
- let res = it.next().unwrap();
- assert!(it.next().is_none());
+ let mut res = it.next().unwrap();
+ while crate_graph[res].origin.is_lang() {
+ res = it.next().unwrap();
+ }
res
}
}