Compiler Warning Reductions (#5609)

* Reduce warnings in AttributedStringBuilderTests

(cherry picked from commit e1f32b2b1df147c93207e01df5c8fec4046b0f48)

* Fixed Sentry warning

(cherry picked from commit e45c3002b2331a6f2d363de61a12377316078602)

* JoinRule and AllowRule conform to Sendable

(cherry picked from commit 27c67c27b944df11adc17bdd405e442e8c50b0d6)

* AudioConverterProtocol conform to Sendable

(cherry picked from commit 352bdab15db424c632538eb3140858eae9fdfb15)

* TimelineControllerProtocol conform to Sendable

(cherry picked from commit 07a927745624db4bab3cf68842027e12177be70b)

* Resolved some AI review notes

(cherry picked from commit 8d3ac820754a6126785e639a98c8c1fcf86ef77f)

# Conflicts:
#	ElementX/Sources/Other/SendableConformance/SendableBox.swift
#	ElementX/Sources/Other/SendableConformance/WeakSendableBox.swift
This commit is contained in:
Michael
2026-05-22 03:56:30 -05:00
committed by GitHub
parent 26f3f699a5
commit dfebb4719c
5 changed files with 66 additions and 30 deletions
@@ -8,7 +8,7 @@
import Foundation
protocol AudioConverterProtocol {
protocol AudioConverterProtocol: Sendable {
func convertToOpusOgg(sourceURL: URL, destinationURL: URL) throws
func convertToMPEG4AAC(sourceURL: URL, destinationURL: URL) throws
}
@@ -49,7 +49,7 @@ class BugReportService: NSObject, BugReportServiceProtocol {
// MARK: - BugReportServiceProtocol
var crashedLastRun: Bool {
SentrySDK.crashedLastRun
SentrySDK.lastRunStatus == .didCrash
}
// swiftlint:disable:next cyclomatic_complexity
@@ -9,7 +9,7 @@ import Foundation
import MatrixRustSDK
/// The rule used for users wishing to join a room.
public enum JoinRule: Equatable, Hashable {
public enum JoinRule: Equatable, Hashable, Sendable {
/// Anyone can join the room without any prior action.
case `public`
/// A user who wishes to join the room must first receive an invite.
@@ -52,7 +52,7 @@ public enum JoinRule: Equatable, Hashable {
}
/// An allow rule which defines a condition that allows joining a room.
public enum AllowRule: Equatable, Hashable {
public enum AllowRule: Equatable, Hashable, Sendable {
/// Only a member of the `room_id` Room can join the one this rule is used in.
case roomMembership(roomID: String)
/// A custom allow rule implementation, containing its JSON representation as a `String`.
@@ -42,7 +42,7 @@ enum TimelineControllerError: Error {
/// It, for example, permits switching from a live timeline to an event focused one, building view specific
/// timeline items, grouping together state events, donating intents to the larger system etc.
@MainActor
protocol TimelineControllerProtocol {
protocol TimelineControllerProtocol: Sendable {
var roomID: String { get }
var timelineKind: TimelineKind { get }