Prefer where-clause over trait bounds in CxxVector
Where-clauses show up less distractingly in rustdocs.
diff --git a/src/cxx_vector.rs b/src/cxx_vector.rs
index c30dd02..b47ec41 100644
--- a/src/cxx_vector.rs
+++ b/src/cxx_vector.rs
@@ -13,7 +13,10 @@
_private: [T; 0],
}
-impl<T: VectorElement> CxxVector<T> {
+impl<T> CxxVector<T>
+where
+ T: VectorElement,
+{
/// Returns the number of elements in the vector.
///
/// Matches the behavior of C++ [std::vector\<T\>::size][size].
@@ -67,7 +70,10 @@
index: usize,
}
-impl<'a, T: VectorElement> IntoIterator for &'a CxxVector<T> {
+impl<'a, T> IntoIterator for &'a CxxVector<T>
+where
+ T: VectorElement,
+{
type Item = &'a T;
type IntoIter = Iter<'a, T>;
@@ -76,7 +82,10 @@
}
}
-impl<'a, T: VectorElement> Iterator for Iter<'a, T> {
+impl<'a, T> Iterator for Iter<'a, T>
+where
+ T: VectorElement,
+{
type Item = &'a T;
fn next(&mut self) -> Option<Self::Item> {