mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Documentation checking catches more issues in Swift 6.0.
Adopt the Swift 6.0 image and fix the errors.
More accurate docs.
(cherry picked from commit adfd61adc5)
Co-authored-by: Rick Newton-Rogers <rnro@apple.com>
This commit is contained in:
1 parent
4d5eb6bb15
commit
653da4d987
100 files changed
+2092
-2061
No files matched your search
@@ -27,8 +27,8 @@ public struct WebSocketOpcode: Sendable {
|
||||
|
||||
/// Create an opcode from the encoded representation.
|
||||
///
|
||||
/// - parameters
|
||||
/// - encoded: The encoded representation of the opcode as an 8-bit integer.
|
||||
/// - Parameters
|
||||
/// - encoded: The encoded representation of the opcode as an 8-bit integer.
|
||||
/// Must be no more than 4 bits large.
|
||||
public init?(encodedWebSocketOpcode encoded: UInt8) {
|
||||
guard encoded < 0x10 else {
|
||||
@@ -89,8 +89,8 @@ extension UInt8 {
|
||||
/// This places the opcode in the four least-significant bits, in
|
||||
/// a form suitable for sending on the wire.
|
||||
///
|
||||
/// - parameters:
|
||||
/// - opcode: The `WebSocketOpcode`.
|
||||
/// - Parameters:
|
||||
/// - opcode: The `WebSocketOpcode`.
|
||||
public init(webSocketOpcode opcode: WebSocketOpcode) {
|
||||
precondition(opcode.networkRepresentation < 0x10)
|
||||
self = opcode.networkRepresentation
|
||||
@@ -100,8 +100,8 @@ extension UInt8 {
|
||||
extension Int {
|
||||
/// Create a UInt8 corresponding to the integer value for a given `WebSocketOpcode`.
|
||||
///
|
||||
/// - parameters:
|
||||
/// - opcode: The `WebSocketOpcode`.
|
||||
/// - Parameters:
|
||||
/// - opcode: The `WebSocketOpcode`.
|
||||
public init(webSocketOpcode opcode: WebSocketOpcode) {
|
||||
precondition(opcode.networkRepresentation < 0x10)
|
||||
self = Int(opcode.networkRepresentation)
|
||||
|
||||
Reference in new issue
Block a user