From a1d4ba19d070509d95135bd63970ce609e6ce181 Mon Sep 17 00:00:00 2001 From: Ben Foppa Date: Fri, 20 Feb 2015 23:29:06 -0500 Subject: [PATCH] Add a phantom type annotation on Transform. --- src/transform.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/transform.rs b/src/transform.rs index 6611aea..a95b2fc 100644 --- a/src/transform.rs +++ b/src/transform.rs @@ -21,12 +21,13 @@ use num::{BaseNum, BaseFloat, zero, one}; use point::{Point, Point3}; use ray::Ray; use rotation::{Rotation, Rotation3}; +use std::marker::PhantomFn; use vector::{Vector, Vector3}; /// A trait representing an [affine /// transformation](https://en.wikipedia.org/wiki/Affine_transformation) that /// can be applied to points or vectors. An affine transformation is one which -pub trait Transform, P: Point>: Sized { +pub trait Transform, P: Point>: Sized + PhantomFn { /// Create an identity transformation. That is, a transformation which /// does nothing. fn identity() -> Self;