mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-03 23:24:12 +00:00
[Swift] Migrate to swift 6.0 and Implements support gRPC v2 (#8983)
* Migrate to swift 6.0 & swift-gRPC 2.0 The following migrates to swift 6.0, and also migrate to swift-grpc 2.0 that uses swift-nio under the hood to provide nicer API and async await Adds sendable to enum & update @_implementationOnly imports to use internal imports * Address PR comments regarding misspelling & proper method naming.
This commit is contained in:
@@ -45,7 +45,7 @@ public struct FlatBufferBuilder {
|
||||
/// Dictonary that stores a map of all the strings that were written to the buffer
|
||||
private var stringOffsetMap: [String: Offset] = [:]
|
||||
/// A check to see if finish(::) was ever called to retreive data object
|
||||
private var finished = false
|
||||
private(set) var finished = false
|
||||
/// A check to see if the buffer should serialize Default values
|
||||
private var serializeDefaults: Bool
|
||||
|
||||
@@ -488,7 +488,7 @@ public struct FlatBufferBuilder {
|
||||
///
|
||||
/// - Parameter bytes: bytes to be written into the buffer
|
||||
/// - Returns: ``Offset`` of the vector
|
||||
mutating public func createVector(bytes: ContiguousBytes) -> Offset {
|
||||
mutating public func createVector(bytes: any ContiguousBytes) -> Offset {
|
||||
bytes.withUnsafeBytes {
|
||||
startVector($0.count, elementSize: MemoryLayout<UInt8>.size)
|
||||
_bb.push(bytes: $0)
|
||||
|
||||
Reference in New Issue
Block a user