Skip to content

Commit eed1b3b

Browse files
committed
v2
1 parent a46eebb commit eed1b3b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crates/ide-assists/src/handlers/wrap_return_type_in_result.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ pub(crate) fn wrap_return_type_in_result(acc: &mut Assists, ctx: &AssistContext<
5050

5151
let new_result_ty =
5252
make::ext::ty_result(type_ref.clone(), make::ty_placeholder()).clone_for_update();
53-
let generic_args =
54-
new_result_ty.syntax().descendants().find_map(ast::GenericArgList::cast).unwrap();
53+
let generic_args = new_result_ty.syntax().descendants().find_map(ast::GenericArgList::cast)?;
5554
let last_genarg = generic_args.generic_args().last()?;
5655

5756
acc.add(

0 commit comments

Comments
 (0)