I have an array of optional values
struct Foo;
let array: [Option<Foo>; 5] = [
Some(Foo {}),
Some(Foo {}),
None,
Some(Foo {}),
None
];
How to sort the array to "bubble" all None values to the top (left/ascending)?
The expected result should look like this
println!("{:?}", array) // [None, None, Some(Foo {}), Some(Foo {}), Some(Foo {})]