mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-09-19 05:00:48 +00:00
Silence the four release-build warnings (#1583)
All four surfaced in the 1.7.1 RC window and are behavior-neutral: - sendPacket(to:) discarded sendPacketDirected's Bool through generic onEngine, tripping unused-result (from #1547's engine-domain flip). - Both _test_drain*Pipeline helpers captured non-Sendable self in @Sendable dispatch closures; they only need the queue, which is Sendable — capture that instead. - removeEphemeralSession returned removeValue's result out of the barrier closure, tripping unused-result on sync(flags:execute:). Co-authored-by: jack <jackjackbits@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
6f32363774
commit
9edb7c26ef
@ -663,7 +663,7 @@ final class SecureIdentityStateManager: SecureIdentityStateManagerProtocol {
|
|||||||
|
|
||||||
func removeEphemeralSession(peerID: PeerID) {
|
func removeEphemeralSession(peerID: PeerID) {
|
||||||
queue.sync(flags: .barrier) {
|
queue.sync(flags: .barrier) {
|
||||||
self.ephemeralSessions.removeValue(forKey: peerID)
|
_ = self.ephemeralSessions.removeValue(forKey: peerID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2943,7 +2943,7 @@ extension BLEService: GossipSyncManager.Delegate {
|
|||||||
|
|
||||||
func sendPacket(to peerID: PeerID, packet: BitchatPacket) {
|
func sendPacket(to peerID: PeerID, packet: BitchatPacket) {
|
||||||
onEngine {
|
onEngine {
|
||||||
sendPacketDirected(packet, to: peerID)
|
_ = sendPacketDirected(packet, to: peerID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3336,9 +3336,12 @@ extension BLEService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func _test_drainPrivateMediaSendPipeline() async {
|
func _test_drainPrivateMediaSendPipeline() async {
|
||||||
|
// Capture only the (Sendable) queue, not self, so the @Sendable
|
||||||
|
// dispatch closures carry no non-Sendable state.
|
||||||
|
let queue = messageQueue
|
||||||
await withCheckedContinuation { continuation in
|
await withCheckedContinuation { continuation in
|
||||||
self.messageQueue.async { [weak self] in
|
queue.async {
|
||||||
self?.messageQueue.async {
|
queue.async {
|
||||||
continuation.resume()
|
continuation.resume()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3357,9 +3360,10 @@ extension BLEService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func _test_drainNoiseMessagePipeline() async {
|
func _test_drainNoiseMessagePipeline() async {
|
||||||
|
let queue = messageQueue
|
||||||
await withCheckedContinuation { continuation in
|
await withCheckedContinuation { continuation in
|
||||||
self.messageQueue.async {
|
queue.async {
|
||||||
self.messageQueue.async {
|
queue.async {
|
||||||
continuation.resume()
|
continuation.resume()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user