From 7a6e216e1b1c40022eddfad18bc8789d0bc20709 Mon Sep 17 00:00:00 2001 From: Srinath Kailasa Date: Mon, 26 Sep 2022 14:11:34 +0100 Subject: [PATCH] Resolve conflicts --- src/data_container.rs | 4 ++-- src/traits/matrix.rs | 12 ------------ src/traits/random_access.rs | 12 ------------ 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/src/data_container.rs b/src/data_container.rs index 55adbef..f798a13 100644 --- a/src/data_container.rs +++ b/src/data_container.rs @@ -114,13 +114,13 @@ impl ArrayContainer { } } -impl Default for ArrayContainer { +impl Default for ArrayContainer { fn default() -> Self { Self::new() } } -impl<'a, Item: Scalar> SliceContainer<'a, Item> { +impl<'a, Item: HScalar> SliceContainer<'a, Item> { /// New slice container from a reference. pub fn new(slice: &'a [Item]) -> SliceContainer { SliceContainer:: { data: slice } diff --git a/src/traits/matrix.rs b/src/traits/matrix.rs index dfdef77..f496742 100644 --- a/src/traits/matrix.rs +++ b/src/traits/matrix.rs @@ -11,29 +11,17 @@ //! [MatrixTraitMut] additionally depends on the trait [RandomAccessMut] to provide //! mutable access to matrix elements. use crate::traits::{Layout, LayoutType, RandomAccess, RandomAccessMut, SizeIdentifier, SizeType}; -<<<<<<< HEAD -use crate::types::Scalar; - -/// Combined trait for basic matrix properties. See [crate::traits::matrix] -/// for details. -pub trait MatrixTrait: -======= use crate::types::HScalar; /// Combined trait for basic matrix properties. See [crate::traits::matrix] /// for details. pub trait MatrixTrait: ->>>>>>> main RandomAccess + Layout + SizeType { } /// Combined trait for mutable matrices. See [crate::traits::matrix] for details. -<<<<<<< HEAD -pub trait MatrixTraitMut: -======= pub trait MatrixTraitMut: ->>>>>>> main RandomAccessMut + MatrixTrait { } diff --git a/src/traits/random_access.rs b/src/traits/random_access.rs index c6da91a..a77a611 100644 --- a/src/traits/random_access.rs +++ b/src/traits/random_access.rs @@ -21,11 +21,7 @@ //! the memory layout defined in that trait. use crate::traits::{Layout, LayoutType}; -<<<<<<< HEAD -use crate::types::{IndexType, Scalar}; -======= use crate::types::{HScalar, IndexType}; ->>>>>>> main /// This trait provides unsafe access to the underlying data. See /// [Random Access](crate::traits::random_access) for a description. @@ -101,11 +97,7 @@ fn assert_dimension1d(elem: IndexType, nelems: IndexType) { ); } -<<<<<<< HEAD -impl + Layout> RandomAccess for Mat { -======= impl + Layout> RandomAccess for Mat { ->>>>>>> main fn get(&self, row: IndexType, col: IndexType) -> Self::Item { assert_dimension(row, col, self.layout().dim()); unsafe { self.get_unchecked(row, col) } @@ -117,11 +109,7 @@ impl + Layout> RandomAccess } } -<<<<<<< HEAD -impl + Layout> RandomAccessMut for Mat { -======= impl + Layout> RandomAccessMut for Mat { ->>>>>>> main fn get_mut(&mut self, row: IndexType, col: IndexType) -> &mut Self::Item { assert_dimension(row, col, self.layout().dim()); unsafe { self.get_unchecked_mut(row, col) }