c_vec-rs
c_vec-rs copied to clipboard
Change advice for the raw pointer.
Instead of using cvec.get(0).unwrap() as *const _, the user should call cvec.as_ref().as_ptr() (in my opinion. ^_^)
Well, one unwrap less. But a bit more confusing. I'm not sure which is preferable in such a situation... :-/
For what it's worth, it's probably less confusing for anyone who isn't familiar with C arrays, or is better acquainted with Rust's slice type.