From c167b1e7fd04f2cf4ea5a8c1a820fb98f45d7642 Mon Sep 17 00:00:00 2001 From: Bill Gestrich <3207996+gestrich@users.noreply.github.com> Date: Sun, 28 Apr 2024 10:49:08 -0400 Subject: [PATCH] Remove redundant variable --- .../LoopCaregiverWatchAppExtension/TimelineProvider.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/LoopCaregiver/LoopCaregiverWatchAppExtension/TimelineProvider.swift b/LoopCaregiver/LoopCaregiverWatchAppExtension/TimelineProvider.swift index 9d232e65..231ed7f9 100644 --- a/LoopCaregiver/LoopCaregiverWatchAppExtension/TimelineProvider.swift +++ b/LoopCaregiver/LoopCaregiverWatchAppExtension/TimelineProvider.swift @@ -73,11 +73,7 @@ class TimelineProvider: AppIntentTimelineProvider { func getEntry(composer: ServiceComposer, configuration: ConfigurationAppIntent) async -> SimpleEntry { return await withCheckedContinuation { continuation in Task { - - var looper: Looper - if let configurationLooper = try composer.accountServiceManager.getLoopers().first(where: {$0.id == configuration.looperID}) { - looper = configurationLooper - } else { + guard let looper = try composer.accountServiceManager.getLoopers().first(where: {$0.id == configuration.looperID}) else { continuation.resume(returning: SimpleEntry(looper: nil, currentGlucoseSample: nil, lastGlucoseChange: nil, date: Date(), entryIndex: 0, isLastEntry: true, glucoseDisplayUnits: composer.settings.glucoseDisplayUnits)) return }