refactor(apple): use guard for checking valid handle (#9614)

Follow-up to #9597
This commit is contained in:
Thomas Eizinger
2025-06-21 23:17:01 +02:00
committed by GitHub
parent 2523bedd19
commit a2c122a3c0

View File

@@ -238,11 +238,9 @@ private final class LogWriter {
workQueue.async { [weak self] in
guard let self = self else { return }
guard let handle = self.ensureFileExists() else { return }
// Get valid handle, recreating file if necessary
if let handle = self.ensureFileExists() {
handle.write(jsonData)
}
handle.write(jsonData)
}
}
}