Skip to content

Remove sendability warnings #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions Sources/SwiftMemcache/Extensions/UInt8+Characters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@
//===----------------------------------------------------------------------===//

extension UInt8 {
static var whitespace: UInt8 = .init(ascii: " ")
static var newline: UInt8 = .init(ascii: "\n")
static var carriageReturn: UInt8 = .init(ascii: "\r")
static var m: UInt8 = .init(ascii: "m")
static var s: UInt8 = .init(ascii: "s")
static var g: UInt8 = .init(ascii: "g")
static var d: UInt8 = .init(ascii: "d")
static var a: UInt8 = .init(ascii: "a")
static var v: UInt8 = .init(ascii: "v")
static var T: UInt8 = .init(ascii: "T")
static var M: UInt8 = .init(ascii: "M")
static var P: UInt8 = .init(ascii: "P")
static var A: UInt8 = .init(ascii: "A")
static var E: UInt8 = .init(ascii: "E")
static var R: UInt8 = .init(ascii: "R")
static var D: UInt8 = .init(ascii: "D")
static var zero: UInt8 = .init(ascii: "0")
static var nine: UInt8 = .init(ascii: "9")
static var increment: UInt8 = .init(ascii: "+")
static var decrement: UInt8 = .init(ascii: "-")
static let whitespace: UInt8 = .init(ascii: " ")
static let newline: UInt8 = .init(ascii: "\n")
static let carriageReturn: UInt8 = .init(ascii: "\r")
static let m: UInt8 = .init(ascii: "m")
static let s: UInt8 = .init(ascii: "s")
static let g: UInt8 = .init(ascii: "g")
static let d: UInt8 = .init(ascii: "d")
static let a: UInt8 = .init(ascii: "a")
static let v: UInt8 = .init(ascii: "v")
static let T: UInt8 = .init(ascii: "T")
static let M: UInt8 = .init(ascii: "M")
static let P: UInt8 = .init(ascii: "P")
static let A: UInt8 = .init(ascii: "A")
static let E: UInt8 = .init(ascii: "E")
static let R: UInt8 = .init(ascii: "R")
static let D: UInt8 = .init(ascii: "D")
static let zero: UInt8 = .init(ascii: "0")
static let nine: UInt8 = .init(ascii: "9")
static let increment: UInt8 = .init(ascii: "+")
static let decrement: UInt8 = .init(ascii: "-")
}
4 changes: 2 additions & 2 deletions Sources/SwiftMemcache/MemcachedFlags.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// The 'v' flag for the meta get command dictates whether the item value should be returned in the data block.
/// The 'T' flag is used for both the meta get and meta set commands to specify the Time-To-Live (TTL) for an item.
/// The 't' flag for the meta get command indicates whether the Time-To-Live (TTL) for the item should be returned.
struct MemcachedFlags {
struct MemcachedFlags: Sendable {
/// Flag 'v' for the 'mg' (meta get) command.
///
/// If true, the item value is returned in the data block.
Expand Down Expand Up @@ -46,7 +46,7 @@ struct MemcachedFlags {
}

/// Enum representing the Time-To-Live (TTL) of a Memcached value.
public enum TimeToLive: Equatable, Hashable {
public enum TimeToLive: Sendable, Equatable, Hashable {
/// The value should never expire.
case indefinitely
/// The value should expire after a specified time.
Expand Down
8 changes: 4 additions & 4 deletions Sources/SwiftMemcache/MemcachedRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
//===----------------------------------------------------------------------===//

import NIOCore
enum MemcachedRequest {
struct SetCommand {
enum MemcachedRequest: Sendable {
struct SetCommand: Sendable {
let key: String
var value: ByteBuffer
var flags: MemcachedFlags?
}

struct GetCommand {
struct GetCommand: Sendable {
let key: String
var flags: MemcachedFlags
}

struct DeleteCommand {
struct DeleteCommand: Sendable {
let key: String
}

Expand Down