mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
Fix remaining compilation warnings
- Remove unnecessary nil check for non-optional URL in PathSplittingTests - Add CodingKeys enum to ServerEvent to explicitly exclude auto-generated id property from encoding/decoding This resolves all compilation warnings except the harmless AppIntents metadata warning.
This commit is contained in:
parent
cfdfe70083
commit
22bcdeffd4
2 changed files with 16 additions and 2 deletions
|
|
@ -363,4 +363,19 @@ struct ServerEvent: Codable, Identifiable, Equatable {
|
||||||
formatter.timeStyle = .medium
|
formatter.timeStyle = .medium
|
||||||
return formatter.string(from: timestamp)
|
return formatter.string(from: timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: - Codable
|
||||||
|
|
||||||
|
/// Coding keys to exclude `id` from encoding/decoding since it's auto-generated
|
||||||
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case type
|
||||||
|
case sessionId
|
||||||
|
case sessionName
|
||||||
|
case command
|
||||||
|
case exitCode
|
||||||
|
case duration
|
||||||
|
case processInfo
|
||||||
|
case message
|
||||||
|
case timestamp
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,7 @@ struct PathSplittingTests {
|
||||||
let fileManager = FileManager.default
|
let fileManager = FileManager.default
|
||||||
let exists = fileManager.fileExists(atPath: nonExistentPath)
|
let exists = fileManager.fileExists(atPath: nonExistentPath)
|
||||||
|
|
||||||
// URL is still created even for non-existent paths
|
// URL is always created for any path (even non-existent ones)
|
||||||
#expect(url != nil)
|
|
||||||
#expect(url.path == nonExistentPath)
|
#expect(url.path == nonExistentPath)
|
||||||
#expect(!exists)
|
#expect(!exists)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue