diff --git a/src/cast.rs b/src/cast.rs index c1bd9b6..4dc1b5a 100644 --- a/src/cast.rs +++ b/src/cast.rs @@ -639,7 +639,8 @@ pub fn cast(n: T) -> Option { /// An interface for casting between machine scalars. pub trait NumCast: Sized + ToPrimitive { /// Creates a number from another value that can be converted into - /// a primitive via the `ToPrimitive` trait. + /// a primitive via the `ToPrimitive` trait. If the source value cannot be + /// represented by the target type, then `None` is returned. fn from(n: T) -> Option; }