IME // Allow throwing Strings as Errors.
This commit is contained in:
parent
1a74d9de14
commit
ea0a6ea3f4
|
@ -327,3 +327,9 @@ extension RangeReplaceableCollection where Element: Hashable {
|
||||||
return filter { set.insert($0).inserted }
|
return filter { set.insert($0).inserted }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: - Error Extension
|
||||||
|
extension String: Error {}
|
||||||
|
extension String: LocalizedError {
|
||||||
|
public var errorDescription: String? { return self }
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue