[T] has the method
Vec derefs to
[T] and thus has it, too.
VecDeque, using two slices internally, does not have a comparable method. I think that such a method should be added. Sure, there are other possibilities to check if a
VecDeque contains a specific element (e.g.
deq.iter().any(|e| e == item)). But
contains expresses the intent in the method name, is shorter and (I would argue) more idiomatic.
What do you think? Should I craft an RFC for this?