Skip to content

Commit bb0fe4e

Browse files
committed
👮 rubocop --autocorrect --only Style/IfInsideElse
1 parent 8d1a221 commit bb0fe4e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

_tools/ruby_h_to_go/lib/ruby_h_to_go/function_definition.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,12 @@ def generate_go_content
121121
if cast_func == ""
122122
go_function_lines << call_c_method
123123
go_function_lines.push(*after_call_function_lines)
124-
else
125-
if after_call_function_lines.empty?
126-
go_function_lines << "return #{cast_func}(#{call_c_method})"
124+
elsif after_call_function_lines.empty?
125+
go_function_lines << "return #{cast_func}(#{call_c_method})"
127126
else
128127
go_function_lines << "ret := #{cast_func}(#{call_c_method})"
129128
go_function_lines.push(*after_call_function_lines)
130129
go_function_lines << "return ret"
131-
end
132130
end
133131

134132
go_function_lines << "}"

0 commit comments

Comments
 (0)