Skip to content

Commit 0c8add3

Browse files
committed
Refactor return statements
gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::do_coercion): Refactor common return statement. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
1 parent 595ccac commit 0c8add3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

gcc/rust/typecheck/rust-coercion.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ TypeCoercionRules::do_coercion (TyTy::BaseType *receiver)
7878
TyTy::TyVar implicit_var
7979
= TyTy::TyVar::get_implicit_infer_var (locus);
8080
try_result = CoercionResult{{}, implicit_var.get_tyty ()};
81-
return true;
8281
}
8382
else
8483
{
@@ -99,9 +98,8 @@ TypeCoercionRules::do_coercion (TyTy::BaseType *receiver)
9998
try_result = CoercionResult{{}, receiver};
10099
else
101100
try_result = CoercionResult{{}, expected->clone ()};
102-
103-
return true;
104101
}
102+
return true;
105103
}
106104

107105
// unsize

0 commit comments

Comments
 (0)