Perf: Add final to classes that are not inherited (#574)

This commit is contained in:
Islam
2025-09-11 19:17:04 +02:00
committed by GitHub
parent 56f1c37129
commit e72fe50ffa
22 changed files with 29 additions and 29 deletions
+3 -3
View File
@@ -37,7 +37,7 @@ This three-message pattern provides:
#### NoiseEncryptionService
The main service managing all Noise operations:
```swift
class NoiseEncryptionService {
final class NoiseEncryptionService {
private let staticIdentityKey: Curve25519.KeyAgreement.PrivateKey
private let sessionManager: NoiseSessionManager
private let channelEncryption = NoiseChannelEncryption()
@@ -47,7 +47,7 @@ class NoiseEncryptionService {
#### NoiseSession
Individual session state for each peer:
```swift
class NoiseSession {
final class NoiseSession {
private var handshakeState: NoiseHandshakeState?
private var sendCipher: NoiseCipherState?
private var receiveCipher: NoiseCipherState?
@@ -58,7 +58,7 @@ class NoiseSession {
#### NoiseSessionManager
Thread-safe session management:
```swift
class NoiseSessionManager {
final class NoiseSessionManager {
private var sessions: [String: NoiseSession] = [:]
private let sessionsQueue = DispatchQueue(label: "noise.sessions", attributes: .concurrent)
}