mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix clamp-like pattern warning in font.rs (#33705)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
77f7b43548
commit
9862df877d
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ impl PlatformFontMethods for PlatformFont {
|
|||
};
|
||||
|
||||
let weight = StyleFontWeight::from_float(weight_val as f32);
|
||||
let stretch = match min(9, max(1, width_val)) {
|
||||
let stretch = match width_val.clamp(1, 9) {
|
||||
1 => StyleFontStretch::ULTRA_CONDENSED,
|
||||
2 => StyleFontStretch::EXTRA_CONDENSED,
|
||||
3 => StyleFontStretch::CONDENSED,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue