Skip to content

Commit 1d8acfc

Browse files
committed
Minor changes
1 parent d4c391f commit 1d8acfc

33 files changed

+702
-810
lines changed

Commons/Tests/CommonsTests/FifoCacheTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class FifoCacheTest: XCTestCase {
1313

1414
override func setUp() {
1515
super.setUp()
16-
self.fifo = FifoCache(count: 10, queueQos: .default)
16+
self.fifo = FifoCache(count: 10)
1717
}
1818

1919
func testSimpleGet() {

Neovim

Submodule Neovim updated 1537 files

NvimApi/Sources/NvimApi/AsyncFuture.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,14 @@ public final class AsyncFuture<Element: Sendable>: Sendable {
88

99
public init() {
1010
(self.stream, self.continuation) = AsyncStream.makeStream()
11-
self.defaultValue = nil
12-
}
13-
14-
public init(_ result: ResultType) {
15-
(self.stream, self.continuation) = AsyncStream.makeStream()
16-
self.defaultValue = result
1711
}
1812

1913
public func yield(_ result: ResultType) {
20-
guard self.defaultValue == nil else { fatalError("This should not happen!") }
21-
2214
self.continuation.yield(result)
2315
self.continuation.finish()
2416
}
2517

2618
public func value() async -> ResultType {
27-
if let defaultValue = self.defaultValue { return defaultValue }
28-
2919
for await result in self.stream {
3020
// Return the first (and only) value
3121
return result
@@ -38,6 +28,4 @@ public final class AsyncFuture<Element: Sendable>: Sendable {
3828

3929
private let stream: AsyncStream<ResultType>
4030
private let continuation: AsyncStream<ResultType>.Continuation
41-
42-
private let defaultValue: ResultType?
4331
}

NvimApi/Sources/NvimApi/MsgpackRpc.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public actor MsgpackRpc {
143143

144144
// MARK: Private
145145

146-
private let log = Logger(subsystem: "com.qvacua.RxPack.MsgpackRpc", category: "rpc")
146+
private let log = Logger(subsystem: "com.qvacua.NvimApi", category: "rpc")
147147

148148
private var closed = false
149149

@@ -159,7 +159,9 @@ public actor MsgpackRpc {
159159
private func startReading() async throws {
160160
Task.detached(priority: .high) {
161161
self.log.debug("Start reading")
162-
guard let dataStream = await self.outPipe?.asyncData else { return }
162+
guard let dataStream = await self.outPipe?.asyncData else {
163+
throw Error(msg: "Could not get the async data stream")
164+
}
163165

164166
var remainderData = Data()
165167
var dataToUnmarshall = Data()

0 commit comments

Comments
 (0)