remove Cancelable from source binders

This commit is contained in:
Aleksey Kladov
2019-01-15 18:13:11 +03:00
parent a36b2cf377
commit 11f3c8afb2
16 changed files with 68 additions and 90 deletions

View File

@@ -320,9 +320,7 @@ fn infer(content: &str) -> String {
.descendants()
.filter_map(ast::FnDef::cast)
{
let func = source_binder::function_from_source(&db, file_id, fn_def)
.unwrap()
.unwrap();
let func = source_binder::function_from_source(&db, file_id, fn_def).unwrap();
let inference_result = func.infer(&db).unwrap();
let body_syntax_mapping = func.body_syntax_mapping(&db).unwrap();
let mut types = Vec::new();
@@ -404,9 +402,7 @@ fn typing_whitespace_inside_a_function_should_not_invalidate_types() {
}
",
);
let func = source_binder::function_from_position(&db, pos)
.unwrap()
.unwrap();
let func = source_binder::function_from_position(&db, pos).unwrap();
{
let events = db.log_executed(|| {
func.infer(&db).unwrap();