From a028292de58fefb507e20cdeb36f313526ee3bfb Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Mon, 4 May 2020 08:28:53 -0500 Subject: [PATCH] Use f64 in f64 examples I believe that this is a copy/paste error; this example was using f32, but it's the docs for f64. --- src/libcore/num/f64.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs index b38fd804ee80f..73e760a2ee8b3 100644 --- a/src/libcore/num/f64.rs +++ b/src/libcore/num/f64.rs @@ -474,11 +474,11 @@ impl f64 { /// assuming that the value is finite and fits in that type. /// /// ``` - /// let value = 4.6_f32; + /// let value = 4.6_f64; /// let rounded = unsafe { value.to_int_unchecked::() }; /// assert_eq!(rounded, 4); /// - /// let value = -128.9_f32; + /// let value = -128.9_f64; /// let rounded = unsafe { value.to_int_unchecked::() }; /// assert_eq!(rounded, i8::MIN); /// ```