Skip to content

Commit

Permalink
perf: remove unnecessary check condition
Browse files Browse the repository at this point in the history
  • Loading branch information
tisfeng committed Jan 26, 2024
1 parent 571b400 commit 4580d35
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Easydict/Feature/Service/Tencent/TencentTranslateType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 4580d35

Please sign in to comment.