GuillaumeGomez/c_vec-rs

Change advice for the raw pointer.

quadrupleslap opened this issue · 2 comments

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.