chore: address linter warnings

Signed-off-by: Toni Förster <toni.foerster@gmail.com>
This commit is contained in:
Toni Förster
2024-08-18 14:46:51 +02:00
parent af75afa912
commit 94577332a1
30 changed files with 164 additions and 103 deletions

View File

@@ -26,8 +26,7 @@ struct URLParser {
urlString.contains("youtube.com") ||
urlString.contains("youtu.be") ||
urlString.contains("youtube-nocookie.com"),
let url = URL(string: "https://\(urlString)"
)
let url = URL(string: "https://\(urlString)")
{
self.url = url
}
@@ -176,10 +175,8 @@ struct URLParser {
private func removePrefixes(_ value: String, _ prefixes: [String]) -> String {
var value = value
for prefix in prefixes {
if value.hasPrefix(prefix) {
value.removeFirst(prefix.count)
}
for prefix in prefixes where value.hasPrefix(prefix) {
value.removeFirst(prefix.count)
}
return value