How can I write generic function that can operate on Vec and LinkedList at the same time?
I have the following two implementations of extracting the largest item out of a collection, one implementation is for a LinkedList
and one for a Vec
.
rust: write generic function that can operate on Vec and LinkedList at the same time
I have the following two implementations of extracting the largest item out of a collection, one implementation is for a LinkedList
and one for a Vec
.