mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
clippy: Fix collapsible_match warning in components/shared (#33664)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
f8933a5735
commit
38251fe5e7
1 changed files with 24 additions and 24 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue