Skip to content

Commit 1a57eff

Browse files
committed
Mark DataContainer.subscript as mutating set
DataContainer already allows mutating via the `append()` method, and all implementations of DataContainer (Foundation Data, UInt8 array, and LowEnergyAdvertisingData) support setting via the subscript notation, but it was not allowed on the generic type because this was marked as only allowing get access.
1 parent 78aacf6 commit 1a57eff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/Bluetooth/Data.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public protocol DataContainer: RandomAccessCollection where Self.Index == Int, S
1818

1919
mutating func reserveCapacity(_ capacity: Int)
2020

21-
subscript(index: Int) -> UInt8 { get }
21+
subscript(index: Int) -> UInt8 { get mutating set }
2222

2323
mutating func append(_ newElement: UInt8)
2424

0 commit comments

Comments
 (0)