How to calculate a generic median in Rust Just run: cargo run to see the results or cargo test to run the tests.