From f7bc6b4c45c1544a6b892ed5bf7c14255d0e56ca Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Sun, 31 Dec 2017 19:30:33 +0100 Subject: [PATCH] Better document Rect::from_points. --- src/rect.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/rect.rs b/src/rect.rs index b66fa318..b9b491a6 100644 --- a/src/rect.rs +++ b/src/rect.rs @@ -220,8 +220,19 @@ where T: Copy + Clone + Zero + PartialOrd + PartialEq + Add + Sub]) -> Self { + // TODO: it would be less confusing if we inflated the size by the smallest + // possible value for the given scalar type to avoid the confusion described + // above. if points.is_empty() { return TypedRect::zero(); }