Slather logo

Coverage for "ModelState.swift" : 0.00%

(0 of 8 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-2022.
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) {
!
19
        switch self {
!
20
        case .afterUpdate:
!
21
            hasher.combine(1)
!
22
        case .beforeUpdate:
!
23
            hasher.combine(0)
!
24
        }
!
25
    }
!
26
27
}