Skip to content

Commit 05d82ac

Browse files
committed
Fix Linux compatibility and clean up compiler warnings
- Add FoundationNetworking import for Linux support in URLSessionNetworkClient - Remove unnecessary conditional cast in InputBlock (BlockElement already conforms to Codable) - Update README with correct repository URL
1 parent 46e57f3 commit 05d82ac

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Add SlackKit to your `Package.swift` file:
3131

3232
```swift
3333
dependencies: [
34-
.package(url: "https://github.com/yourusername/SlackKit.git", from: "1.0.0")
34+
.package(url: "https://github.com/diegotl/SlackKit.git", from: "1.0.0")
3535
]
3636
```
3737

Sources/SlackKit/Client/URLSessionNetworkClient.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#if canImport(FoundationNetworking)
2+
import FoundationNetworking
3+
#endif
14
import Foundation
25

36
// MARK: - URLSessionNetworkClient

Sources/SlackKit/Models/Blocks/InputBlock.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ public struct InputBlock: Block {
113113
try container.encodeIfPresent(optional, forKey: .optional)
114114

115115
// Encode element polymorphically
116-
if let elementValue = element as? Encodable {
117-
try container.encode(elementValue, forKey: .element)
118-
}
116+
try container.encode(element, forKey: .element)
119117
}
120118
}
121119

0 commit comments

Comments
 (0)