Skip to content

Commit 101d841

Browse files
committed
refactoring: remove nonisolated(unsafe)
1 parent 46c5e93 commit 101d841

File tree

1 file changed

+14
-28
lines changed

1 file changed

+14
-28
lines changed

Sources/Log/Classes/Models/LogLevel.swift

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Foundation
88
// MARK: - LogLevel
99

1010
/// A set that includes all log levels.
11-
public struct LogLevel: OptionSet {
11+
public struct LogLevel: OptionSet, Sendable {
1212
// MARK: Initialization
1313

1414
/// Creates a new log level.
@@ -22,33 +22,19 @@ public struct LogLevel: OptionSet {
2222

2323
public typealias RawValue = UInt
2424

25-
#if swift(>=6.0)
26-
/// Creates a new default `.off` instance with a bitmask of `1 << 0`.
27-
public nonisolated(unsafe) static let off = LogLevel(rawValue: offBitmask)
28-
/// Creates a new default `.debug` instance with a bitmask of `1 << 1`.
29-
public nonisolated(unsafe) static let debug = LogLevel(rawValue: debugBitmask)
30-
/// Creates a new default `.info` instance with a bitmask of `1 << 2`.
31-
public nonisolated(unsafe) static let info = LogLevel(rawValue: infoBitmask)
32-
/// Creates a new default `.error` instance with a bitmask of `1 << 3`.
33-
public nonisolated(unsafe) static let error = LogLevel(rawValue: errorBitmask)
34-
/// Creates a new default `.fault` instance with a bitmask of `1 << 4`.
35-
public nonisolated(unsafe) static let fault = LogLevel(rawValue: faultBitmask)
36-
/// Creates a new default `.error` instance.
37-
public nonisolated(unsafe) static let all = LogLevel(rawValue: allBitmask)
38-
#else
39-
/// Creates a new default `.off` instance with a bitmask of `1 << 0`.
40-
public static let off = LogLevel(rawValue: offBitmask)
41-
/// Creates a new default `.debug` instance with a bitmask of `1 << 1`.
42-
public static let debug = LogLevel(rawValue: debugBitmask)
43-
/// Creates a new default `.info` instance with a bitmask of `1 << 2`.
44-
public static let info = LogLevel(rawValue: infoBitmask)
45-
/// Creates a new default `.error` instance with a bitmask of `1 << 3`.
46-
public static let error = LogLevel(rawValue: errorBitmask)
47-
/// Creates a new default `.fault` instance with a bitmask of `1 << 4`.
48-
public static let fault = LogLevel(rawValue: faultBitmask)
49-
/// Creates a new default `.error` instance.
50-
public static let all = LogLevel(rawValue: allBitmask)
51-
#endif
25+
/// Creates a new default `.off` instance with a bitmask of `1 << 0`.
26+
public static let off = LogLevel(rawValue: offBitmask)
27+
/// Creates a new default `.debug` instance with a bitmask of `1 << 1`.
28+
public static let debug = LogLevel(rawValue: debugBitmask)
29+
/// Creates a new default `.info` instance with a bitmask of `1 << 2`.
30+
public static let info = LogLevel(rawValue: infoBitmask)
31+
/// Creates a new default `.error` instance with a bitmask of `1 << 3`.
32+
public static let error = LogLevel(rawValue: errorBitmask)
33+
/// Creates a new default `.fault` instance with a bitmask of `1 << 4`.
34+
public static let fault = LogLevel(rawValue: faultBitmask)
35+
/// Creates a new default `.error` instance.
36+
public static let all = LogLevel(rawValue: allBitmask)
37+
5238
/// Returns the raw bitmask value of the LogLevel and satisfies the `RawRepresentable` protocol.
5339
public let rawValue: RawValue
5440

0 commit comments

Comments
 (0)