Skip to content

Commit 3ec21a7

Browse files
committed
Extend HasAfEnum with Default, Copy and Debug traits
1 parent c4b747d commit 3ec21a7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/core/arith.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ where
383383
type OutType = T;
384384

385385
fn convert(&self) -> Array<Self::OutType> {
386-
constant(self.clone(), Dim4::new(&[1, 1, 1, 1]))
386+
constant(*self, Dim4::new(&[1, 1, 1, 1]))
387387
}
388388
}
389389

src/core/array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ mod afserde {
872872
/// Serialize Implementation of Array
873873
impl<T> Serialize for Array<T>
874874
where
875-
T: std::default::Default + std::clone::Clone + Serialize + HasAfEnum + std::fmt::Debug,
875+
T: Serialize + HasAfEnum,
876876
{
877877
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
878878
where
@@ -892,7 +892,7 @@ mod afserde {
892892
/// Deserialize Implementation of Array
893893
impl<'de, T> Deserialize<'de> for Array<T>
894894
where
895-
T: Deserialize<'de> + HasAfEnum + std::fmt::Debug,
895+
T: Deserialize<'de> + HasAfEnum,
896896
{
897897
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
898898
where

src/core/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl From<u32> for ColorMap {
120120
}
121121

122122
mod private {
123-
pub trait Sealed {}
123+
pub trait Sealed: std::fmt::Debug + std::marker::Copy + std::default::Default {}
124124

125125
impl Sealed for num::complex::Complex<f32> {}
126126
impl Sealed for num::complex::Complex<f64> {}

0 commit comments

Comments
 (0)