mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
Check only one fixture
This commit is contained in:
parent
773f3afd36
commit
95ba7da1ab
1 changed files with 6 additions and 1 deletions
|
@ -207,7 +207,12 @@ pub fn parse_single_fixture(fixture: &str) -> Option<FixtureEntry> {
|
||||||
if !fixture.lines().any(|it| it.trim_start().starts_with("//-")) {
|
if !fixture.lines().any(|it| it.trim_start().starts_with("//-")) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
parse_fixture(fixture).into_iter().nth(0)
|
|
||||||
|
let fixtures = parse_fixture(fixture);
|
||||||
|
if fixtures.len() > 1 {
|
||||||
|
panic!("too many fixtures");
|
||||||
|
}
|
||||||
|
fixtures.into_iter().nth(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Comparison functionality borrowed from cargo:
|
// Comparison functionality borrowed from cargo:
|
||||||
|
|
Loading…
Reference in a new issue