master 永远处于稳定状态,这个分支代码可以随时用来部署。不允许在该分支直接提交代码。
开发分支,包含了项目最新的功能和代码,所有开发都在 develop 上进行。一般情况下小的修改直接在这个分支上提交代码。
extension RawRepresentable where Self: Hashable { | |
private static func iterateEnum<T: Hashable>(_: T.Type) -> AnyIterator<T> { | |
var index = 0 | |
let closure: () -> T? = { | |
let next = withUnsafePointer(to: &index) { | |
$0.withMemoryRebound(to: T.self, capacity: 1) { $0.pointee } | |
} | |
guard next.hashValue == index else { return nil } |