Remove redundant conversion in `clock` example

This commit is contained in:
Héctor Ramón Jiménez 2020-02-12 22:10:00 +01:00
parent 265c08661c
commit 9dc9305d93
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ impl From<chrono::DateTime<chrono::Local>> for LocalTime {
impl canvas::layer::Drawable for LocalTime { impl canvas::layer::Drawable for LocalTime {
fn draw(&self, frame: &mut canvas::Frame) { fn draw(&self, frame: &mut canvas::Frame) {
let center = frame.center(); let center = frame.center();
let radius = frame.width().min(frame.height()) as f32 / 2.0; let radius = frame.width().min(frame.height()) / 2.0;
let offset = Vector::new(center.x, center.y); let offset = Vector::new(center.x, center.y);
let path = canvas::Path::new(|path| { let path = canvas::Path::new(|path| {