mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Fix issues found by rust-clippy
This commit is contained in:
parent
6303126e0c
commit
20beaf5af3
23 changed files with 106 additions and 121 deletions
|
@ -178,7 +178,7 @@ impl FontHandleMethods for FontHandle {
|
|||
let max_advance_width = au_from_pt(bounding_rect.size.width as f64);
|
||||
let average_advance = self.glyph_index('0')
|
||||
.and_then(|idx| self.glyph_h_advance(idx))
|
||||
.map(|advance| Au::from_f64_px(advance))
|
||||
.map(Au::from_f64_px)
|
||||
.unwrap_or(max_advance_width);
|
||||
|
||||
let metrics = FontMetrics {
|
||||
|
@ -201,7 +201,7 @@ impl FontHandleMethods for FontHandle {
|
|||
line_gap: Au::from_f64_px(line_gap),
|
||||
};
|
||||
debug!("Font metrics (@{} pt): {:?}", self.ctfont.pt_size() as f64, metrics);
|
||||
return metrics;
|
||||
metrics
|
||||
}
|
||||
|
||||
fn table_for_tag(&self, tag: FontTableTag) -> Option<Box<FontTable>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue