diff --git a/src/structs/dmat.rs b/src/structs/dmat.rs index c93fb012..af49f97a 100644 --- a/src/structs/dmat.rs +++ b/src/structs/dmat.rs @@ -128,7 +128,7 @@ impl DMat { DMat { nrows: nrows, ncols: ncols, - mij: Vec::from_slice(vec) + mij: vec.to_vec() } } } diff --git a/src/structs/dvec.rs b/src/structs/dvec.rs index 500147a6..c300a3d6 100644 --- a/src/structs/dvec.rs +++ b/src/structs/dvec.rs @@ -46,7 +46,7 @@ impl DVec { assert!(dim <= vec.len()); DVec { - at: Vec::from_slice(vec.slice_to(dim)) + at: vec.slice_to(dim).to_vec() } } }