From f0b58fd1fa93bf8d9c201e891528be1b1cc54512 Mon Sep 17 00:00:00 2001 From: Steffen Lyngbaek Date: Fri, 13 Mar 2020 16:27:39 -0700 Subject: [PATCH] Use idiomatic way of defining floats --- crates/rust-analyzer/src/main_loop.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs index eb41e3cdacb..c38a25a44de 100644 --- a/crates/rust-analyzer/src/main_loop.rs +++ b/crates/rust-analyzer/src/main_loop.rs @@ -733,7 +733,7 @@ fn send_startup_progress( title: "rust-analyzer".into(), cancellable: None, message: Some(format!("{}/{} packages", progress, total)), - percentage: Some(100 as f64 * progress as f64 / total as f64), + percentage: Some(100.0 * progress as f64 / total as f64), }), ); } @@ -742,7 +742,7 @@ fn send_startup_progress( WorkDoneProgress::Report(WorkDoneProgressReport { cancellable: None, message: Some(format!("{}/{} packages", progress, total)), - percentage: Some(100 as f64 * progress as f64 / total as f64), + percentage: Some(100.0 * progress as f64 / total as f64), }), ), (_, true) => send_startup_progress_notif(