It would be great if we could allow mutating associated values directly one day.
switch self {
case .some(inout wrapped):
mutate(&wrapped)
}
That should also allow avoiding the potential issue with CoW.
Related talk:
It would be great if we could allow mutating associated values directly one day.
switch self {
case .some(inout wrapped):
mutate(&wrapped)
}
That should also allow avoiding the potential issue with CoW.
Related talk: