Skip to content

Commit 36a5ca9

Browse files
committed
Minor
1 parent 45e343a commit 36a5ca9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crates/ra_assists/src/handlers/change_return_type_to_result.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ use crate::{AssistContext, AssistId, Assists};
1919
// fn foo() -> Result<i32, > { Ok(42i32) }
2020
// ```
2121
pub(crate) fn change_return_type_to_result(acc: &mut Assists, ctx: &AssistContext) -> Option<()> {
22-
let fn_def = ctx.find_node_at_offset::<ast::FnDef>();
23-
let fn_def = &mut fn_def?;
22+
let fn_def = ctx.find_node_at_offset::<ast::FnDef>()?;
2423
let ret_type = &fn_def.ret_type()?.type_ref()?;
2524
if ret_type.syntax().text().to_string().starts_with("Result<") {
2625
return None;

0 commit comments

Comments
 (0)