Skip to content

Commit

Permalink
Switch doctests to match functions
Browse files Browse the repository at this point in the history
  • Loading branch information
PlasmaPower committed Jul 9, 2017
1 parent aaa4ab3 commit 426034b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions traits/src/float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit 426034b

Please sign in to comment.