Switch doctests to match functions

This commit is contained in:
Lee Bousfield 2017-07-09 08:30:22 -04:00
parent aaa4ab357f
commit 426034ba09
No known key found for this signature in database
GPG Key ID: C41F6504C1164209
1 changed files with 4 additions and 4 deletions

View File

@ -330,14 +330,14 @@ pub trait Float
/// use num_traits::Float;
/// use std::f64;
///
/// let nan: f64 = f64::NAN;
/// let neg_nan: f64 = -f64::NAN;
///
/// let f = 7.0;
/// let g = -7.0;
///
/// assert!(f.is_sign_positive());
/// assert!(!g.is_sign_positive());
/// assert!(!nan.is_sign_negative());
/// assert!(!neg_nan.is_sign_positive());
/// ```
fn is_sign_positive(self) -> bool;
@ -348,14 +348,14 @@ pub trait Float
/// use num_traits::Float;
/// use std::f64;
///
/// let neg_nan: f64 = -f64::NAN;
/// let nan: f64 = f64::NAN;
///
/// let f = 7.0;
/// let g = -7.0;
///
/// assert!(!f.is_sign_negative());
/// assert!(g.is_sign_negative());
/// assert!(!neg_nan.is_sign_positive());
/// assert!(!nan.is_sign_negative());
/// ```
fn is_sign_negative(self) -> bool;