diff --git a/src/structs/mat_macros.rs b/src/structs/mat_macros.rs index bc236065..d539a6cc 100644 --- a/src/structs/mat_macros.rs +++ b/src/structs/mat_macros.rs @@ -36,11 +36,11 @@ macro_rules! as_array_impl( // FIXME: because of https://github.com/rust-lang/rust/issues/16418 we cannot do the // array-to-mat conversion by-value: // - // pub fn from_array(&self, array: [N, ..$dim]) -> $t + // pub fn from_array(array: [N, ..$dim]) -> $t /// View a column-major array of array as a vector. #[inline] - pub fn from_array_ref(&self, array: &[[N, ..$dim], ..$dim]) -> &$t { + pub fn from_array_ref(array: &[[N, ..$dim], ..$dim]) -> &$t { unsafe { mem::transmute(array) } @@ -48,7 +48,7 @@ macro_rules! as_array_impl( /// View a column-major array of array as a mutable vector. #[inline] - pub fn from_array_mut(&mut self, array: &mut [[N, ..$dim], ..$dim]) -> &mut $t { + pub fn from_array_mut(array: &mut [[N, ..$dim], ..$dim]) -> &mut $t { unsafe { mem::transmute(array) } diff --git a/src/structs/vec_macros.rs b/src/structs/vec_macros.rs index 7785933f..0933f33b 100644 --- a/src/structs/vec_macros.rs +++ b/src/structs/vec_macros.rs @@ -37,11 +37,11 @@ macro_rules! as_array_impl( // FIXME: because of https://github.com/rust-lang/rust/issues/16418 we cannot do the // array-to-vec conversion by-value: // - // pub fn from_array(&self, array: [N, ..$dim]) -> $t + // pub fn from_array(array: [N, ..$dim]) -> $t /// View an array as a vector. #[inline] - pub fn from_array_ref(&self, array: &[N, ..$dim]) -> &$t { + pub fn from_array_ref(array: &[N, ..$dim]) -> &$t { unsafe { mem::transmute(array) } @@ -49,7 +49,7 @@ macro_rules! as_array_impl( /// View an array as a vector. #[inline] - pub fn from_array_mut(&mut self, array: &mut [N, ..$dim]) -> &mut $t { + pub fn from_array_mut(array: &mut [N, ..$dim]) -> &mut $t { unsafe { mem::transmute(array) }