Add Debug impl for CxxVector<T>
diff --git a/src/cxx_vector.rs b/src/cxx_vector.rs
index b8de942..037fe6a 100644
--- a/src/cxx_vector.rs
+++ b/src/cxx_vector.rs
@@ -2,7 +2,7 @@
use crate::extern_type::ExternType;
use crate::kind::Trivial;
use core::ffi::c_void;
-use core::fmt::{self, Display};
+use core::fmt::{self, Debug, Display};
use core::marker::{PhantomData, PhantomPinned};
use core::mem;
use core::ptr;
@@ -124,6 +124,15 @@
}
}
+impl<T> Debug for CxxVector<T>
+where
+ T: VectorElement + Debug,
+{
+ fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+ formatter.debug_list().entries(self).finish()
+ }
+}
+
pub struct TypeName<T> {
element: PhantomData<T>,
}