Skip to content

Commit c31419d

Browse files
committed
Remove redundant throws
1 parent bf8ec3a commit c31419d

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Sources/ContainerOS/DirectoryWatcher.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public actor DirectoryWatcher {
5959
///
6060
/// - Parameters:
6161
/// - handler: handler to run on directory state change.
62-
public func startWatching(handler: @Sendable @escaping ([URL]) throws -> Void) throws {
62+
public func startWatching(handler: @Sendable @escaping ([URL]) throws -> Void) {
6363
self.task = Task {
6464
var pollDirectory = true
6565

Sources/Helpers/APIServer/APIServer+Start.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ extension APIServer {
123123
group.addTask {
124124
do {
125125
let localhostResolver = LocalhostDNSHandler(log: log)
126-
try await localhostResolver.monitorResolvers()
126+
await localhostResolver.monitorResolvers()
127127

128128
let nxDomainResolver = NxDomainResolver()
129129
let compositeResolver = CompositeResolver(handlers: [localhostResolver, nxDomainResolver])

Sources/Helpers/APIServer/LocalhostDNSHandler.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ actor LocalhostDNSHandler: DNSHandler {
3636
self.dns = [:]
3737
}
3838

39-
public func monitorResolvers() async throws {
40-
try await self.watcher.startWatching { fileURLs in
39+
public func monitorResolvers() async {
40+
await self.watcher.startWatching { fileURLs in
4141
var dns: [String: IPv4] = [:]
4242
let regex = try Regex(HostDNSResolver.localhostOptionsRegex)
4343

0 commit comments

Comments
 (0)