133 fn from(other: F) -> Loc<F, 1> { |
133 fn from(other: F) -> Loc<F, 1> { |
134 Loc([other]) |
134 Loc([other]) |
135 } |
135 } |
136 } |
136 } |
137 |
137 |
|
138 impl<F> Loc<F, 1> { |
|
139 #[inline] |
|
140 pub fn flatten1d(self) -> F { |
|
141 let Loc([v]) = self; |
|
142 v |
|
143 } |
|
144 } |
|
145 |
138 impl<F, const N : usize> From<Loc<F, N>> for [F; N] { |
146 impl<F, const N : usize> From<Loc<F, N>> for [F; N] { |
139 #[inline] |
147 #[inline] |
140 fn from(other : Loc<F, N>) -> [F; N] { |
148 fn from(other : Loc<F, N>) -> [F; N] { |
141 other.0 |
149 other.0 |
142 } |
150 } |