Fix clippy warnings

This commit is contained in:
Edgar Geier 2023-03-03 18:59:45 +01:00
parent 4ac5e1c6a6
commit 17102f5144
No known key found for this signature in database
GPG key ID: 7A65B51FD6B75EF5
3 changed files with 3 additions and 4 deletions

View file

@ -285,7 +285,6 @@ impl Application for Window {
);
let font_size_picker = {
let editor = self.editor.lock().unwrap();
pick_list(
FontSize::all(),
Some(self.font_size),

View file

@ -116,7 +116,7 @@ where
height += self.metrics.line_height;
}
let size = Size::new(width as f32, height as f32);
let size = Size::new(width, height);
log::debug!("layout {:?} in {:?}", size, instant.elapsed());

View file

@ -103,7 +103,7 @@ where
}
}
let height = layout_lines as f32 * editor.buffer().metrics().line_height as f32;
let height = layout_lines as f32 * editor.buffer().metrics().line_height;
let size = Size::new(limits.max().width, height);
log::info!("size {:?}", size);
@ -212,7 +212,7 @@ where
handle,
Rectangle::new(
layout.position() + [self.padding.left as f32, self.padding.top as f32].into(),
Size::new(view_w as f32, view_h as f32),
Size::new(view_w, view_h),
),
);