Avoid repeated plan generation and unused diagnostics in layout fuzzers
This commit is contained in:
1 parent
add6774980
commit
84dad211f5
2 files changed
+14
-10
No files matched your search
@@ -444,12 +444,6 @@ pub fn diverges(plan: &Plan, case: Case, seed: u64) -> Option<String> {
|
||||
cold.state.root = Some(root);
|
||||
cold.frame();
|
||||
|
||||
let places: HashMap<WidgetId, usize> = tree
|
||||
.ids
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(i, &id)| (id, i))
|
||||
.collect();
|
||||
let mut drawn = 0;
|
||||
for (i, (&w, &c)) in tree.ids.iter().zip(&cold_tree.ids).enumerate() {
|
||||
let (got, want) = (warm.region(&w), cold.region(&c));
|
||||
@@ -457,6 +451,12 @@ pub fn diverges(plan: &Plan, case: Case, seed: u64) -> Option<String> {
|
||||
if got == want {
|
||||
continue;
|
||||
}
|
||||
let places: HashMap<WidgetId, usize> = tree
|
||||
.ids
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(i, &id)| (id, i))
|
||||
.collect();
|
||||
// Where two trees disagree is rarely where the cause is, so the
|
||||
// ancestry comes with it, marking the widgets that own a region.
|
||||
let mut chain = Vec::new();
|
||||
|
||||
Reference in new issue
Block a user