From 3ee13ec528a0af76a947e0580b7b6bf065957bce Mon Sep 17 00:00:00 2001 From: sebcrozet Date: Sun, 27 May 2018 12:25:58 +0200 Subject: [PATCH] Update changelog. --- CHANGELOG.md | 4 ++++ src/geometry/point_construction.rs | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57e14ebc..0fd586f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ documented here. This project adheres to [Semantic Versioning](http://semver.org/). +## [0.16.0] - WIP +### Added + * Add construction of a `Point` from an array by implementing the `From` trait. + ## [0.15.0] The most notable change of this release is the support for using part of the library without the rust standard library (i.e. it supports `#![no_std]`). See the corresponding [documentation](http://nalgebra.org/wasm_and_embedded_programming/). diff --git a/src/geometry/point_construction.rs b/src/geometry/point_construction.rs index 2282354f..5915c8fb 100644 --- a/src/geometry/point_construction.rs +++ b/src/geometry/point_construction.rs @@ -128,12 +128,12 @@ componentwise_constructors_impl!( macro_rules! from_array_impl( ($($D: ty, $len: expr);*) => {$( - impl From <[N; $len]> for Point { - fn from (coords : [N; $len]) -> Self { + impl From<[N; $len]> for Point { + fn from (coords: [N; $len]) -> Self { Point::from_coordinates(coords.into()) } } )*} ); -from_array_impl!(U1,1; U2,2; U3,3; U4,4; U5,5; U6,6); +from_array_impl!(U1, 1; U2, 2; U3, 3; U4, 4; U5, 5; U6, 6);