Use slices instead of borrowed Vec<MessageItem>

slices are more flexible and idiomatic.  The construction of a Vec
requires allocation on the heap, whereas a slice can come from
anywhere.