diff options
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index 8aacb1a7f..b81d91e80 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs | |||
@@ -320,9 +320,7 @@ fn infer(content: &str) -> String { | |||
320 | .descendants() | 320 | .descendants() |
321 | .filter_map(ast::FnDef::cast) | 321 | .filter_map(ast::FnDef::cast) |
322 | { | 322 | { |
323 | let func = source_binder::function_from_source(&db, file_id, fn_def) | 323 | let func = source_binder::function_from_source(&db, file_id, fn_def).unwrap(); |
324 | .unwrap() | ||
325 | .unwrap(); | ||
326 | let inference_result = func.infer(&db).unwrap(); | 324 | let inference_result = func.infer(&db).unwrap(); |
327 | let body_syntax_mapping = func.body_syntax_mapping(&db).unwrap(); | 325 | let body_syntax_mapping = func.body_syntax_mapping(&db).unwrap(); |
328 | let mut types = Vec::new(); | 326 | let mut types = Vec::new(); |
@@ -404,9 +402,7 @@ fn typing_whitespace_inside_a_function_should_not_invalidate_types() { | |||
404 | } | 402 | } |
405 | ", | 403 | ", |
406 | ); | 404 | ); |
407 | let func = source_binder::function_from_position(&db, pos) | 405 | let func = source_binder::function_from_position(&db, pos).unwrap(); |
408 | .unwrap() | ||
409 | .unwrap(); | ||
410 | { | 406 | { |
411 | let events = db.log_executed(|| { | 407 | let events = db.log_executed(|| { |
412 | func.infer(&db).unwrap(); | 408 | func.infer(&db).unwrap(); |