Import old content, load from disk
This commit is contained in:
9
CHDataManagement/Extensions/Optional+Extensions.swift
Normal file
9
CHDataManagement/Extensions/Optional+Extensions.swift
Normal file
@ -0,0 +1,9 @@
|
||||
import Foundation
|
||||
|
||||
extension Optional {
|
||||
|
||||
func map<T>(_ transform: (Wrapped) throws -> T?) rethrows -> T? {
|
||||
guard let self else { return nil }
|
||||
return try transform(self)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user