We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0615b31 commit 49f094cCopy full SHA for 49f094c
Sources/NIOIRC/IRCChannelHandler.swift
@@ -304,16 +304,17 @@ extension ByteBuffer {
304
}
305
306
#if swift(>=5)
307
+ // NIO 2
308
#else
309
fileprivate extension ByteBuffer {
310
// NIO 2 API for NIO 1
311
- @inline(__always)
312
+ @inline(__always) @discardableResult
313
mutating func writeString(_ string: String) -> Int {
- return self.write(string: string)
314
+ return self.write(string: string) ?? -1337 // never fails
315
316
317
318
mutating func writeInteger<T: FixedWidthInteger>(_ integer: T) -> Int {
319
return self.write(integer: integer)
320
0 commit comments