From 4580d350515b5ceac3ed58ebcd20ab96b0467534 Mon Sep 17 00:00:00 2001 From: tisfeng Date: Fri, 26 Jan 2024 23:10:14 +0800 Subject: [PATCH] perf: remove unnecessary check condition --- Easydict/Feature/Service/Tencent/TencentTranslateType.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Easydict/Feature/Service/Tencent/TencentTranslateType.swift b/Easydict/Feature/Service/Tencent/TencentTranslateType.swift index 647e4de67..f64c58713 100644 --- a/Easydict/Feature/Service/Tencent/TencentTranslateType.swift +++ b/Easydict/Feature/Service/Tencent/TencentTranslateType.swift @@ -59,9 +59,8 @@ struct TencentTranslateType: Equatable { ] static func transType(from: Language, to: Language) -> TencentTranslateType { - // !!!: Tencent translate support traditionalChinese as target language if target languages contain simplifiedChinese. guard let targetLanguages = supportedTypes[from], - targetLanguages.containsChinese() || targetLanguages.contains(to) || from == to || from.isKindOfChinese() + targetLanguages.contains(to) || from == to else { return .unsupported }