Remove unnecessary generic type on the *Extern traits
MODIFY
src/manual/core/matx.rs
src/manual/core/matx.rs
@@ -232,7 +232,7 @@ impl<T, A: SizedArray<T>> fmt::Debug for Matx<T, A> {
impl<T, A: SizedArray<T>> ToInputArray for Matx<T, A>
where
- Self: MatxExtern<T, A>,
+ Self: MatxExtern,
{
#[inline]
fn input_array(&self) -> Result<_InputArray> {
@@ -244,7 +244,7 @@ where
impl<T, A: SizedArray<T>> ToInputArray for &Matx<T, A>
where
- Matx<T, A>: MatxExtern<T, A>,
+ Matx<T, A>: MatxExtern,
{
#[inline]
fn input_array(&self) -> Result<_InputArray> {
@@ -254,7 +254,7 @@ where
impl<T, A: SizedArray<T>> ToOutputArray for Matx<T, A>
where
- Self: MatxExtern<T, A>,
+ Self: MatxExtern,
{
#[inline]
fn output_array(&mut self) -> Result<_OutputArray> {
@@ -266,7 +266,7 @@ where
impl<T, A: SizedArray<T>> ToOutputArray for &mut Matx<T, A>
where
- Matx<T, A>: MatxExtern<T, A>,
+ Matx<T, A>: MatxExtern,
{
#[inline]
fn output_array(&mut self) -> Result<_OutputArray> {
@@ -276,7 +276,7 @@ where
impl<T, A: SizedArray<T>> ToInputOutputArray for Matx<T, A>
where
- Self: MatxExtern<T, A>,
+ Self: MatxExtern,
{
#[inline]
fn input_output_array(&mut self) -> Result<_InputOutputArray> {
@@ -288,7 +288,7 @@ where
impl<T, A: SizedArray<T>> ToInputOutputArray for &mut Matx<T, A>
where
- Matx<T, A>: MatxExtern<T, A>,
+ Matx<T, A>: MatxExtern,
{
#[inline]
fn input_output_array(&mut self) -> Result<_InputOutputArray> {
@@ -297,7 +297,7 @@ where
}
#[doc(hidden)]
-pub trait MatxExtern<T, A: SizedArray<T>> {
+pub trait MatxExtern {
#[doc(hidden)]
unsafe fn extern_input_array(&self) -> sys::Result<extern_receive!(_InputArray)>;
#[doc(hidden)]
@@ -314,7 +314,7 @@ macro_rules! matx_extern {
fn $extern_input_array_output(instance: extern_send!(mut $crate::core::Matx<$type, $array>), ocvrs_return: *mut $crate::sys::Result<extern_receive!($crate::core::_InputOutputArray)>);
}
- impl $crate::core::MatxExtern<$type, $array> for $crate::core::Matx<$type, $array> {
+ impl $crate::core::MatxExtern for $crate::core::Matx<$type, $array> {
#[inline]
unsafe fn extern_input_array(&self) -> $crate::sys::Result<extern_receive!($crate::core::_InputArray)> {
return_send!(via ocvrs_return);

MODIFY
src/manual/core/tuple.rs
src/manual/core/tuple.rs
@@ -5,7 +5,7 @@ use std::mem::ManuallyDrop;
pub struct Tuple<T>
where
- Self: TupleExtern<T>,
+ Self: TupleExtern,
{
ptr: *mut c_void,
_d: PhantomData<T>,
@@ -13,7 +13,7 @@ where
impl<T> Boxed for Tuple<T>
where
- Self: TupleExtern<T>,
+ Self: TupleExtern,
{
#[inline]
unsafe fn from_raw(ptr: *mut c_void) -> Self {
@@ -38,7 +38,7 @@ where
impl<T> OpenCVType<'_> for Tuple<T>
where
- Self: TupleExtern<T>,
+ Self: TupleExtern,
{
type Arg = Self;
type ExternReceive = *mut c_void;
@@ -51,7 +51,7 @@ where
impl<T> OpenCVTypeArg<'_> for Tuple<T>
where
- Tuple<T>: TupleExtern<T>,
+ Tuple<T>: TupleExtern,
{
type ExternContainer = Self;
@@ -63,7 +63,7 @@ where
impl<T> OpenCVTypeExternContainer<'_> for Tuple<T>
where
- Tuple<T>: TupleExtern<T>,
+ Tuple<T>: TupleExtern,
{
type ExternSend = *const c_void;
type ExternSendMut = *mut c_void;
@@ -86,14 +86,14 @@ where
impl<T> Drop for Tuple<T>
where
- Tuple<T>: TupleExtern<T>,
+ Tuple<T>: TupleExtern,
{
fn drop(&mut self) {
unsafe { self.extern_delete() }
}
}
-pub trait TupleExtern<T> {
+pub trait TupleExtern {
#[doc(hidden)]
unsafe fn extern_delete(&mut self);
}
@@ -113,7 +113,7 @@ macro_rules! tuple_extern {
)+
}
- impl $crate::core::TupleExtern<$type> for $crate::core::Tuple<$type> {
+ impl $crate::core::TupleExtern for $crate::core::Tuple<$type> {
#[inline]
unsafe fn extern_delete(&mut self) {
$extern_delete(self.as_raw_mut())

MODIFY
src/manual/core/vec.rs
src/manual/core/vec.rs
@@ -145,7 +145,7 @@ impl<T, const N: usize> OpenCVTypeExternContainer<'_> for VecN<T, N> {
impl<T, const N: usize> ToInputArray for VecN<T, N>
where
- Self: VecExtern<T, N>,
+ Self: VecExtern,
{
#[inline]
fn input_array(&self) -> Result<_InputArray> {
@@ -157,7 +157,7 @@ where
impl<T, const N: usize> ToInputArray for &VecN<T, N>
where
- VecN<T, N>: VecExtern<T, N>,
+ VecN<T, N>: VecExtern,
{
#[inline]
fn input_array(&self) -> Result<_InputArray> {
@@ -167,7 +167,7 @@ where
impl<T, const N: usize> ToOutputArray for VecN<T, N>
where
- Self: VecExtern<T, N>,
+ Self: VecExtern,
{
#[inline]
fn output_array(&mut self) -> Result<_OutputArray> {
@@ -179,7 +179,7 @@ where
impl<T, const N: usize> ToOutputArray for &mut VecN<T, N>
where
- VecN<T, N>: VecExtern<T, N>,
+ VecN<T, N>: VecExtern,
{
#[inline]
fn output_array(&mut self) -> Result<_OutputArray> {
@@ -189,7 +189,7 @@ where
impl<T, const N: usize> ToInputOutputArray for VecN<T, N>
where
- Self: VecExtern<T, N>,
+ Self: VecExtern,
{
#[inline]
fn input_output_array(&mut self) -> Result<_InputOutputArray> {
@@ -201,7 +201,7 @@ where
impl<T, const N: usize> ToInputOutputArray for &mut VecN<T, N>
where
- VecN<T, N>: VecExtern<T, N>,
+ VecN<T, N>: VecExtern,
{
#[inline]
fn input_output_array(&mut self) -> Result<_InputOutputArray> {
@@ -210,7 +210,7 @@ where
}
#[doc(hidden)]
-pub trait VecExtern<T, const N: usize> {
+pub trait VecExtern {
#[doc(hidden)]
unsafe fn extern_input_array(&self) -> sys::Result<extern_receive!(_InputArray)>;
#[doc(hidden)]
@@ -227,7 +227,7 @@ macro_rules! vecn_extern {
fn $extern_input_array_output(instance: extern_send!(mut $crate::core::VecN<$type, $len>), ocvrs_return: *mut $crate::sys::Result<extern_receive!($crate::core::_InputOutputArray)>);
}
- impl $crate::core::VecExtern<$type, $len> for $crate::core::VecN<$type, $len> {
+ impl $crate::core::VecExtern for $crate::core::VecN<$type, $len> {
#[inline]
unsafe fn extern_input_array(&self) -> $crate::sys::Result<extern_receive!($crate::core::_InputArray)> {
return_send!(via ocvrs_return);

Remove unnecessary generic type on the *Extern traits