Skip to content

Commit afd2422

Browse files
committed
LogMessage is conform to Hashable
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
1 parent cb9e7cd commit afd2422

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

Sources/LogStream/LogMessage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import OSLog
99

1010
/// Represents a log message captured from the activity logs.
11-
public struct LogMessage {
11+
public struct LogMessage: Hashable {
1212
/// The log message string.
1313
public let message: String
1414

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// OSLogType+Hashable.swift
3+
//
4+
//
5+
// Created by Wouter Hennen on 22/05/2023.
6+
//
7+
8+
import OSLog
9+
10+
extension OSLogType: Hashable {
11+
public func hash(into hasher: inout Hasher) {
12+
hasher.combine(self.rawValue)
13+
}
14+
}

0 commit comments

Comments
 (0)