aboutsummaryrefslogtreecommitdiff
path: root/crates/salsa/tests/integration.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/salsa/tests/integration.rs')
-rw-r--r--crates/salsa/tests/integration.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/salsa/tests/integration.rs b/crates/salsa/tests/integration.rs
index 3cec330e6..aed9219be 100644
--- a/crates/salsa/tests/integration.rs
+++ b/crates/salsa/tests/integration.rs
@@ -79,19 +79,19 @@ where
79 79
80fn mk_queries() -> salsa::QueryConfig<State, Data> { 80fn mk_queries() -> salsa::QueryConfig<State, Data> {
81 salsa::QueryConfig::<State, Data>::new() 81 salsa::QueryConfig::<State, Data>::new()
82 .with_ground_query(GET_TEXT, |state, id| { 82 .with_ground_query(GET_TEXT, Box::new(|state, id| {
83 mk_ground_query::<u32, String>(state, id, |state, id| state[id].clone()) 83 mk_ground_query::<u32, String>(state, id, |state, id| state[id].clone())
84 }) 84 }))
85 .with_ground_query(GET_FILES, |state, id| { 85 .with_ground_query(GET_FILES, Box::new(|state, id| {
86 mk_ground_query::<(), Vec<u32>>(state, id, |state, &()| state.keys().cloned().collect()) 86 mk_ground_query::<(), Vec<u32>>(state, id, |state, &()| state.keys().cloned().collect())
87 }) 87 }))
88 .with_query(FILE_NEWLINES, |query_ctx, id| { 88 .with_query(FILE_NEWLINES, Box::new(|query_ctx, id| {
89 mk_query(query_ctx, id, |query_ctx, &id| { 89 mk_query(query_ctx, id, |query_ctx, &id| {
90 let text = query_ctx.get_text(id); 90 let text = query_ctx.get_text(id);
91 text.lines().count() 91 text.lines().count()
92 }) 92 })
93 }) 93 }))
94 .with_query(TOTAL_NEWLINES, |query_ctx, id| { 94 .with_query(TOTAL_NEWLINES, Box::new(|query_ctx, id| {
95 mk_query(query_ctx, id, |query_ctx, &()| { 95 mk_query(query_ctx, id, |query_ctx, &()| {
96 let mut total = 0; 96 let mut total = 0;
97 for &id in query_ctx.get_files().iter() { 97 for &id in query_ctx.get_files().iter() {
@@ -99,7 +99,7 @@ fn mk_queries() -> salsa::QueryConfig<State, Data> {
99 } 99 }
100 total 100 total
101 }) 101 })
102 }) 102 }))
103} 103}
104 104
105#[test] 105#[test]