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`
    |
This commit is contained in:
Sebastian Dröge 2020-12-29 16:56:13 +02:00
parent 59397c84be
commit d84336dc12

View file

@ -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;