(&self, other: &Box<dyn DataType>)
| 29 | } |
| 30 | |
| 31 | fn equals(&self, other: &Box<dyn DataType>) -> bool { |
| 32 | let row_type: Box<dyn DataType> = Box::new(self.clone()); |
| 33 | if other.is_any() || other.is_variant_contains(&row_type) { |
| 34 | return true; |
| 35 | } |
| 36 | |
| 37 | if let Some(other_row) = other.as_any().downcast_ref::<RowType>() { |
| 38 | if self.tuple.len() != other_row.tuple.len() { |
| 39 | return false; |
| 40 | } |
| 41 | |
| 42 | let len = self.tuple.len(); |
| 43 | for i in 0..len { |
| 44 | if !self.tuple[i].eq(&other_row.tuple[i]) { |
| 45 | return false; |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | return true; |
| 50 | } |
| 51 | |
| 52 | false |
| 53 | } |
| 54 | |
| 55 | fn as_any(&self) -> &dyn Any { |
| 56 | self |
no test coverage detected