Remove a redundant defer

This commit is contained in:
woxtu 2022-12-23 20:36:27 +09:00
parent 3e2282cb03
commit 2a66afc52c
1 changed files with 27 additions and 29 deletions

View File

@ -133,7 +133,6 @@ final public class AttachmentViewModel: NSObject, ObservableObject, Identifiable
.receive(on: DispatchQueue.main)
.assign(to: &$thumbnail)
defer {
let uploadTask = Task { @MainActor in
do {
var output = try await load(input: input)
@ -166,7 +165,6 @@ final public class AttachmentViewModel: NSObject, ObservableObject, Identifiable
await uploadTask.value
}
}
}
deinit {
os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function)