Bug when using `timeout()` inside `Halite::Client.new do`
oprypin opened this issue · 0 comments
oprypin commented
I think this line has a bug because it looks different from other lines around it:
halite/src/halite/chainable.cr
Lines 223 to 225 in e7c7476
I have this code
c = Halite::Client.new do
endpoint("https://example.com/")
timeout(1.seconds)
logging(skip_request_body: true, skip_response_body: true)
end
I get this error
92 | timeout(1.seconds)
^------
Error: instantiating 'timeout(Time::Span)'
In lib/halite/src/halite/chainable.cr:224:54
224 | timeout ? timeout(timeout, timeout, timeout) : branch
^-----
Error: instantiating 'branch()'
In lib/halite/src/halite/client.cr:275:23
275 | oneshot_options.merge!(options)
^-----
Error: no overload matches 'Halite::Options#merge!' with type Nil
Overloads are:
- Halite::Options#merge!(other : Halite::Options)