vapor / async-kit

Sugary extensions for the SwiftNIO library
MIT License
71 stars 25 forks source link

Removed file:line: from signature and code in Future+Try.swift #88

Closed rjhancock closed 2 years ago

rjhancock commented 2 years ago

removed due to depreciation warnings issued with latest Vapor.

Removes depreciated parameters file:line: from method signature and calling method.

gwynne commented 2 years ago

It won't let me offer an explicit "suggestion" on lines that didn't change, but I recommend changing line 4 to this for completeness' sake:

    public func tryFlatMap<NewValue>(
        file _: StaticString = #file, line _: UInt = #line,
        _ callback: @escaping (Value) throws -> EventLoopFuture<NewValue>
    ) -> EventLoopFuture<NewValue> {

(just adding the _ names so the parameters are explicitly shown to be unused - plus a touch of cleanup on the overly long line while we're at it πŸ˜…)

rjhancock commented 2 years ago

Done.

codecov-commenter commented 2 years ago

Codecov Report

Merging #88 (29add85) into main (3b1e7e9) will increase coverage by 1.41%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #88      +/-   ##
==========================================
+ Coverage   94.41%   95.82%   +1.41%     
==========================================
  Files          19       19              
  Lines        1199     1199              
==========================================
+ Hits         1132     1149      +17     
+ Misses         67       50      -17     
Flag Coverage Ξ”
unittests 95.82% <100.00%> (+1.41%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Ξ”
Sources/AsyncKit/EventLoopFuture/Future+Try.swift 100.00% <100.00%> (ΓΈ)
...AsyncKit/EventLoopFuture/Future+Conjunctions.swift 99.71% <0.00%> (+0.28%) :arrow_up:
...syncKit/EventLoopFuture/EventLoopFutureQueue.swift 100.00% <0.00%> (+2.17%) :arrow_up:
...s/AsyncKit/EventLoopFuture/Future+Collection.swift 100.00% <0.00%> (+3.12%) :arrow_up:
...ncKit/ConnectionPool/EventLoopConnectionPool.swift 94.40% <0.00%> (+3.72%) :arrow_up:
.../ConnectionPool/EventLoopGroupConnectionPool.swift 94.77% <0.00%> (+4.47%) :arrow_up:
...syncKit/EventLoopFuture/Future+Miscellaneous.swift 75.00% <0.00%> (+5.00%) :arrow_up:
VaporBot commented 2 years ago

These changes are now available in 1.11.1