clippy: Fix collapsible_match warning in components/shared (#33664)

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
tanishka 2024-10-07 13:22:38 +05:30 committed by GitHub
parent f8933a5735
commit 38251fe5e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,8 +13,7 @@ pub fn unicode_plane(codepoint: char) -> u32 {
}
pub fn is_cjk(codepoint: char) -> bool {
if let Some(block) = codepoint.block() {
match block {
if let Some(
UnicodeBlock::CJKRadicalsSupplement |
UnicodeBlock::KangxiRadicals |
UnicodeBlock::IdeographicDescriptionCharacters |
@ -34,9 +33,10 @@ pub fn is_cjk(codepoint: char) -> bool {
UnicodeBlock::CJKUnifiedIdeographs |
UnicodeBlock::CJKCompatibilityIdeographs |
UnicodeBlock::CJKCompatibilityForms |
UnicodeBlock::HalfwidthandFullwidthForms => return true,
_ => {},
}
UnicodeBlock::HalfwidthandFullwidthForms,
) = codepoint.block()
{
return true;
}
// https://en.wikipedia.org/wiki/Plane_(Unicode)#Supplementary_Ideographic_Plane