| commit | 5104c8658b08cc6ab696d302055272afb3412dee | [log] [tgz] |
|---|---|---|
| author | David Tolnay <dtolnay@gmail.com> | Fri Apr 24 13:26:01 2020 -0700 |
| committer | David Tolnay <dtolnay@gmail.com> | Sat Apr 25 18:02:10 2020 -0700 |
| tree | 364d0b47c89c8d950ba48ae8fdb4397281771986 | |
| parent | 0a63b4cf1053383c82392c1af17d0bace08a0b72 [diff] [blame] |
Clarify that VectorElement is not meant to be implemented
diff --git a/src/cxx_vector.rs b/src/cxx_vector.rs index 7db8a45..c3f4fe7 100644 --- a/src/cxx_vector.rs +++ b/src/cxx_vector.rs
@@ -64,8 +64,10 @@ } } +// Methods are private; not intended to be implemented outside of cxxbridge +// codebase. #[doc(hidden)] -pub trait VectorElement<T> { +pub unsafe trait VectorElement<T> { fn __get_unchecked(v: &CxxVector<T>, pos: usize) -> &T where Self: Sized;