mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
remove other unwraps
This commit is contained in:
parent
f64eecd2e2
commit
85ead6ec27
1 changed files with 5 additions and 1 deletions
|
@ -404,7 +404,11 @@ impl FunctionBuilder {
|
||||||
leading_ws,
|
leading_ws,
|
||||||
ret_type: fn_def.ret_type(),
|
ret_type: fn_def.ret_type(),
|
||||||
// PANIC: we guarantee we always create a function body with a tail expr
|
// PANIC: we guarantee we always create a function body with a tail expr
|
||||||
tail_expr: fn_def.body().unwrap().tail_expr().unwrap(),
|
tail_expr: fn_def
|
||||||
|
.body()
|
||||||
|
.expect("generated function should have a body")
|
||||||
|
.tail_expr()
|
||||||
|
.expect("function body should have a tail expression"),
|
||||||
should_focus_return_type: self.should_focus_return_type,
|
should_focus_return_type: self.should_focus_return_type,
|
||||||
fn_def,
|
fn_def,
|
||||||
trailing_ws,
|
trailing_ws,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue