Skip to content

Commit c1bfb7c

Browse files
authored
fix new NIO and new Swift compiler warnings (#179)
1 parent 859f6b4 commit c1bfb7c

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ let package = Package(
2323
.library(name: "NIOHTTP2", targets: ["NIOHTTP2"]),
2424
],
2525
dependencies: [
26-
.package(url: "https://github.com/apple/swift-nio.git", from: "2.9.0"),
26+
.package(url: "https://github.com/apple/swift-nio.git", from: "2.11.0"),
2727
],
2828
targets: [
2929
.target(name: "NIOHTTP2Server",

Sources/NIOHPACK/HuffmanTables.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ internal struct HuffmanDecoderFlags : OptionSet
209209
{
210210
var rawValue: UInt8
211211

212-
static let none = HuffmanDecoderFlags(rawValue: 0b000)
212+
static let none = HuffmanDecoderFlags([])
213213
static let accepted = HuffmanDecoderFlags(rawValue: 0b001)
214214
static let symbol = HuffmanDecoderFlags(rawValue: 0b010)
215215
static let failure = HuffmanDecoderFlags(rawValue: 0b100)

Sources/NIOHTTP2/HTTP2FrameParser.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ struct HTTP2FrameDecoder {
309309
switch (try self.processNextState()) {
310310
case .needMoreData:
311311
return nil
312-
case .frame(let frame):
313-
return frame
312+
case .frame(let frame, let flowControlledLength):
313+
return (frame, flowControlledLength)
314314
case .continue:
315315
// tail-call ourselves
316316
return try nextFrame()

Sources/NIOHTTP2/HTTP2StreamChannel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ final class HTTP2StreamChannel: Channel, ChannelCore {
136136
self.streamID = streamID
137137
self.multiplexer = multiplexer
138138
self.windowManager = InboundWindowManager(targetSize: Int32(targetWindowSize))
139-
self._isWritable = Atomic(value: true)
139+
self._isWritable = .makeAtomic(value: true)
140140
self.state = .idle
141141
self.writabilityManager = StreamChannelFlowController(highWatermark: outboundBytesHighWatermark,
142142
lowWatermark: outboundBytesLowWatermark,
@@ -302,7 +302,7 @@ final class HTTP2StreamChannel: Channel, ChannelCore {
302302
return self._isWritable.load()
303303
}
304304

305-
private let _isWritable: Atomic<Bool>
305+
private let _isWritable: NIOAtomic<Bool>
306306

307307
public var isActive: Bool {
308308
return self.state == .active || self.state == .closing || self.state == .localActive

0 commit comments

Comments
 (0)