Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Constructor
- impl<T> Vector<T> where T: Copy + fmt::Display + num::Num {
- pub fn from_slice(v: &[T]) -> Vector<T> {
- let mut vec: Vec<T> = Vec::new();
- for i in 0..(v.len()) {
- vec.push(v[i])
- }
- Vector::<T>{ vec: vec }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement