mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-13 08:43:27 +01:00
[AltStoreCore] Flattens optional values when @Managed/@AsyncManaged.wrappedValue is also optional
This commit is contained in:
19
AltStoreCore/Protocols/OptionalProtocol.swift
Normal file
19
AltStoreCore/Protocols/OptionalProtocol.swift
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// OptionalProtocol.swift
|
||||
// AltStoreCore
|
||||
//
|
||||
// Created by Riley Testut on 5/11/23.
|
||||
// Copyright © 2023 Riley Testut. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
// Public so we can use as generic constraint.
|
||||
public protocol OptionalProtocol
|
||||
{
|
||||
associatedtype Wrapped
|
||||
|
||||
static var none: Self { get }
|
||||
}
|
||||
|
||||
extension Optional: OptionalProtocol {}
|
||||
Reference in New Issue
Block a user