Slather logo

Coverage for "ModelState.swift" : 100.00%

(7 of 7 relevant lines covered)

ChatLayout/Classes/Core/Model/ModelState.swift

1
//
2
// ChatLayout
3
// ModelState.swift
4
// https://github.com/ekazaev/ChatLayout
5
//
6
// Created by Eugene Kazaev in 2020-2021.
7
// Distributed under the MIT license.
8
//
9
10
import Foundation
11
12
enum ModelState: Hashable, CaseIterable {
13
14
    case beforeUpdate
15
16
    case afterUpdate
17
18
    func hash(into hasher: inout Hasher) {
1880000x
19
        switch self {
1880000x
20
        case .afterUpdate:
1880000x
21
            hasher.combine(1)
22
        case .beforeUpdate:
1880000x
23
            hasher.combine(0)
1210000x
24
        }
1880000x
25
    }
1880000x
26
27
}