From 9e02b13f3eb5218e21f8afdd2e2b37b5ca38c024 Mon Sep 17 00:00:00 2001 From: Eduard Bopp Date: Fri, 28 Jul 2017 20:12:07 +0200 Subject: [PATCH] Refer to other conversion method in documentation This is motivated by #235 hoping to improve discoverability of this feature. --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index af3411e5..3ab855d7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -444,12 +444,16 @@ pub fn distance_squared(p1: &P, p2: &P) -> P::Real { * Cast */ /// Converts an object from one type to an equivalent or more general one. +/// +/// See also `::try_convert` for conversion to more specific types. #[inline] pub fn convert>(t: From) -> To { To::from_subset(&t) } /// Attempts to convert an object to a more specific one. +/// +/// See also `::convert` for conversion to more general types. #[inline] pub fn try_convert, To>(t: From) -> Option { t.to_subset()