Skip to content

Commit

Permalink
Merge pull request #96 from geieredgar/clippy-fixes
Browse files Browse the repository at this point in the history
Fix `f32` clippy warnings
  • Loading branch information
jackpot51 authored Mar 5, 2023
2 parents 4ac5e1c + 17102f5 commit 28d8f59
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion examples/editor-libcosmic/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion examples/editor-libcosmic/src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down
4 changes: 2 additions & 2 deletions examples/editor-libcosmic/src/text_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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),
),
);

Expand Down

0 comments on commit 28d8f59

Please sign in to comment.