From d84336dc120d44f2e3b9a7c1c680a2a63a6bf395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 29 Dec 2020 16:56:13 +0200 Subject: [PATCH] tutorials/basic-tutorial-5: Don't unnecessarily cast float literals to f64 error: casting float literal to `f64` is unnecessary --> tutorials/src/bin/basic-tutorial-5.rs:141:13 | 141 | 1.0 as f64, | ^^^^^^^^^^ help: try: `1.0_f64` | --- tutorials/src/bin/basic-tutorial-5.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tutorials/src/bin/basic-tutorial-5.rs b/tutorials/src/bin/basic-tutorial-5.rs index 44f195e5e..31b985a2b 100644 --- a/tutorials/src/bin/basic-tutorial-5.rs +++ b/tutorials/src/bin/basic-tutorial-5.rs @@ -134,12 +134,7 @@ mod tutorial5 { .expect("Unable to set the pipeline to the `Ready` state"); }); - let slider = gtk::Scale::with_range( - gtk::Orientation::Horizontal, - 0.0 as f64, - 100.0 as f64, - 1.0 as f64, - ); + let slider = gtk::Scale::with_range(gtk::Orientation::Horizontal, 0.0, 100.0, 1.0); let pipeline = playbin.clone(); let slider_update_signal_id = slider.connect_value_changed(move |slider| { let pipeline = &pipeline;