std: Rewrite vec_reserve_shared_actual in Rust