File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
FirebaseCore/Internal/Sources/HeartbeatLogging Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,9 @@ struct RingBuffer<Element>: Sequence {
2222 private var tailIndex : Array < Element ? > . Index
2323
2424 /// Error types for `RingBuffer` operations.
25- enum Error : LocalizedError {
25+ enum Error : SolidLocalizedError {
2626 case outOfBoundsPush( pushIndex: Array < Element ? > . Index , endIndex: Array < Element ? > . Index )
2727
28- var errorDescription : String ? {
29- return ( errorDescription as String )
30- }
31-
3228 var errorDescription : String {
3329 switch self {
3430 case let . outOfBoundsPush( pushIndex, endIndex) :
@@ -113,3 +109,16 @@ struct RingBuffer<Element>: Sequence {
113109// MARK: - Codable
114110
115111extension RingBuffer : Codable where Element: Codable { }
112+
113+
114+ // MARK: - SolidLocalizedError
115+
116+ protocol SolidLocalizedError : LocalizedError {
117+ var errorDescription : String { get }
118+ }
119+
120+ extension SolidLocalizedError {
121+ var errorDescription : String ? {
122+ ( errorDescription as String )
123+ }
124+ }
You can’t perform that action at this time.
0 commit comments