Re:Learning Rust via Advent of Code
by general_pizza on Monday February 04, 2019 @05:56PM
(#19081518)
The docs are a tad misleading but the important piece is to look at the signature. The `where P: Pattern<'a>` portion states that split needs a type that implements the Pattern trait. If you follow the link to the Pattern trait then at the bottom you'll see a section[0] listing types implementing the trait (&[char] being one) and therefore can be passed into split. Hope that helps!
[0] https://doc.rust-lang.org/std/str/pattern/trait.Pattern.html...