I just need to sort a vector, and It's returning '()', So I can't use the it, Here is the code:
sort_unstable modifies the given vector.
If you want to keep the unsorted one, clone it first, then sort that clone.
let mut vs = v.clone(); vs.sort_unstable();
I have the exact same error when I clone it.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.