mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
replace match by if let statements if possible
This commit is contained in:
parent
608511ddc3
commit
b78979d692
7 changed files with 39 additions and 58 deletions
|
@ -393,9 +393,8 @@ impl Shaper {
|
|||
|
||||
fn advance_for_shaped_glyph(&self, mut advance: Au, character: char, options: &ShapingOptions)
|
||||
-> Au {
|
||||
match options.letter_spacing {
|
||||
None => {}
|
||||
Some(letter_spacing) => advance = advance + letter_spacing,
|
||||
if let Some(letter_spacing) = options.letter_spacing {
|
||||
advance = advance + letter_spacing;
|
||||
};
|
||||
|
||||
// CSS 2.1 § 16.4 states that "word spacing affects each space (U+0020) and non-breaking
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue