I'm trying to build a wrapper for a c library for windows and linux and have the problem that windows wants u32, while linux wants u64.
currently my api always takes u32 know since it's easy to upcast to u64. However with Vec<32>
I need to convert it via:
let unsafe_pages: Vec<bindings::size_t> = pages.iter().map(|&p| p as bindings::size_t).collect();
pages
is a Vec<32>
is there an easier way to make the conversion without itering over the collection?