Several fixes and optimizations all over the library #28

Merged
javier merged 22 commits from library/several-fixes-and-optimizations into main 2026-07-26 09:56:33 +00:00
Showing only changes of commit 681b756dc1 - Show all commits
@@ -47,30 +47,18 @@ extension Amiibo {
_ threeDS: [Components.Schemas.AmiiboGame]?,
_ wiiU: [Components.Schemas.AmiiboGame]?
) {
guard (`switch` != nil && `switch`?.isEmpty == false)
|| (switch2 != nil && switch2?.isEmpty == false)
|| (threeDS != nil && threeDS?.isEmpty == false)
|| (wiiU != nil && wiiU?.isEmpty == false)
guard `switch`?.isEmpty == false
|| switch2?.isEmpty == false
|| threeDS?.isEmpty == false
|| wiiU?.isEmpty == false
else {
return nil
}
self.switch = {
guard let `switch` else { return [] }
return `switch`.map { .init($0) }
}()
self.switch2 = {
guard let switch2 else { return [] }
return switch2.map { .init($0) }
}()
self.threeDS = {
guard let threeDS else { return [] }
return threeDS.map { .init($0) }
}()
self.wiiU = {
guard let wiiU else { return [] }
return wiiU.map { .init($0) }
}()
self.switch = `switch`?.map { .init($0) } ?? []
self.switch2 = switch2?.map { .init($0) } ?? []
self.threeDS = threeDS?.map { .init($0) } ?? []
self.wiiU = wiiU?.map { .init($0) } ?? []
}
}