I am attempting to practice using the strategy pattern and thought to sort a vector using a function selected at runtime, ideally being able to change the data in place using a mutable reference.
I tried to add the keyword &mut in multiple places but could not figure out how to get my code to work with the mutable references.
Here is my code as a rust playground link https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=bffd720880c4a316dfeca0ee57d27a44
Any advice on how to do this, or improvements on my code would be greatly appreciated. Thanks
A browser interface to the Rust compiler to experiment with the language