From b3e04b85d6dcfcf4f3094288b3e97f03b976e8ab Mon Sep 17 00:00:00 2001 From: Marceau TONELLI Date: Tue, 17 Dec 2024 18:33:27 +0100 Subject: [PATCH] Refactor FXIOS-10205 [Swiftlint] Resolve 1 implicitly_unwrapped_optional violations in OpenSearchParser (#23811) Resolve warnings in OpenSearchParser Co-authored-by: Marceau Tonelli --- .../Frontend/Browser/SearchEngines/OpenSearchParser.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefox-ios/Client/Frontend/Browser/SearchEngines/OpenSearchParser.swift b/firefox-ios/Client/Frontend/Browser/SearchEngines/OpenSearchParser.swift index d242c2850b30..df5f8d5b3d17 100644 --- a/firefox-ios/Client/Frontend/Browser/SearchEngines/OpenSearchParser.swift +++ b/firefox-ios/Client/Frontend/Browser/SearchEngines/OpenSearchParser.swift @@ -47,7 +47,7 @@ class OpenSearchParser { return nil } - var searchTemplate: String! + var searchTemplate: String? var suggestTemplate: String? for urlIndexer in urlIndexers { let type = urlIndexer.attributes["type"] @@ -101,7 +101,7 @@ class OpenSearchParser { } } - if searchTemplate == nil { + guard let searchTemplate else { return nil }