Skip to content

Commit a3b2ec9

Browse files
committed
Inline return variables
1 parent af98946 commit a3b2ec9

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

ext/rbs_extension/main.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,7 @@ static VALUE parse_type_try(VALUE a) {
123123
arg->encoding
124124
);
125125

126-
127-
VALUE ruby_ast = rbs_struct_to_ruby_value(ctx, type);
128-
return ruby_ast;
126+
return rbs_struct_to_ruby_value(ctx, type);
129127
}
130128

131129
static rbs_lexer_t *alloc_lexer_from_buffer(rbs_allocator_t *allocator, VALUE string, rb_encoding *encoding, int start_pos, int end_pos) {
@@ -212,8 +210,7 @@ static VALUE parse_method_type_try(VALUE a) {
212210
arg->encoding
213211
);
214212

215-
VALUE ruby_ast = rbs_struct_to_ruby_value(ctx, (rbs_node_t *) method_type);
216-
return ruby_ast;
213+
return rbs_struct_to_ruby_value(ctx, (rbs_node_t *) method_type);
217214
}
218215

219216
static VALUE rbsparser_parse_method_type(VALUE self, VALUE buffer, VALUE start_pos, VALUE end_pos, VALUE variables, VALUE require_eof) {
@@ -252,8 +249,7 @@ static VALUE parse_signature_try(VALUE a) {
252249
arg->encoding
253250
);
254251

255-
VALUE ruby_ast = rbs_struct_to_ruby_value(ctx, (rbs_node_t *) signature);
256-
return ruby_ast;
252+
return rbs_struct_to_ruby_value(ctx, (rbs_node_t *) signature);
257253
}
258254

259255
static VALUE rbsparser_parse_signature(VALUE self, VALUE buffer, VALUE start_pos, VALUE end_pos) {

0 commit comments

Comments
 (0)