Skip to content

Commit

Permalink
Fix run return value typing
Browse files Browse the repository at this point in the history
  • Loading branch information
lloeki committed Apr 13, 2023
1 parent 38b0b85 commit 2994528
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/datadog/appsec/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ def run(input, timeout = WAF::LibDDWAF::DDWAF_RUN_TIMEOUT)
start_ns = Core::Utils::Time.get_time(:nanosecond)

# TODO: remove multiple assignment
_code, res = _ = @context.run(input, timeout)
# @type var res: WAF::Result
_code, res = @context.run(input, timeout)

stop_ns = Core::Utils::Time.get_time(:nanosecond)

Expand Down
2 changes: 1 addition & 1 deletion vendor/rbs/libddwaf/0/datadog/appsec/waf.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ module Datadog
def initialize: (Handle handle) -> void
def finalize: () -> void

def run: (data input, ?::Integer timeout) -> ::Array[top]
def run: (data input, ?::Integer timeout) -> [::Symbol, Result]

private

Expand Down

0 comments on commit 2994528

Please sign in to comment.