How to compute the minimum difference of a vector in Rust?

The below code:

```
fn main() {
    let vector: Vec<f64> = vec![1.025, 1.028, 1.03, 1.05, 1.051];

    let mut result: Vec<f64> = Vec::new();
    for i in 0..vector.len() - 1 {
        result.push(vector[i] - vector[i + 1]);
    }
    println!("{:?}", result);

    let minimum = std::cmp::min(&result[0], &result[1]);
    println!("{}", minimum)
}

```

Results in:

```none
error[E0277]: the trait bound `f64: std::cmp::Ord` is not satisfied
  --> src/main.rs:10:19
   |
10 |     let minimum = std::cmp::min(&result[0], &result[1]);
   |                   ^^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `f64`
   |
   = note: required because of the requirements on the impl of `std::cmp::Ord` for `&f64`
   = note: required by `std::cmp::min`

```

The challenges are:

* [no comparison between f32/f64 types](https://github.com/rust-lang/rust/issues/40922)
* only two values can be compared at any one time; how can I compute all values? Can a fold be used or does it have to be a macro?
* what is a memory efficient way to perform the difference over the vector? For example, creating a range and iterating over a vector (`for i in 0..5 { vector[i] }`) is more expensive than creating an iterator over the vector itself `for i in &vector`.