Clippy Fixes
This commit is contained in:
parent
e39f8eabd5
commit
5200f67196
5 changed files with 61 additions and 62 deletions
|
|
@ -10,7 +10,12 @@ pub struct CacheKey {
|
|||
}
|
||||
|
||||
impl CacheKey {
|
||||
pub fn new(font_id: fontdb::ID, glyph_id: u16, font_size: i32, pos: (f32, f32)) -> (Self, i32, i32) {
|
||||
pub fn new(
|
||||
font_id: fontdb::ID,
|
||||
glyph_id: u16,
|
||||
font_size: i32,
|
||||
pos: (f32, f32),
|
||||
) -> (Self, i32, i32) {
|
||||
let (x, x_bin) = SubpixelBin::new(pos.0);
|
||||
let (y, y_bin) = SubpixelBin::new(pos.1);
|
||||
(
|
||||
|
|
@ -54,6 +59,7 @@ impl SubpixelBin {
|
|||
(trunc - 1, Self::Zero)
|
||||
}
|
||||
} else {
|
||||
#[allow(clippy::collapsible_else_if)]
|
||||
if fract < 0.125 {
|
||||
(trunc, Self::Zero)
|
||||
} else if fract < 0.375 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue