Skip to content

Commit

Permalink
Hide the trait methods
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanUkhov committed Feb 20, 2024
1 parent 9c1b7a5 commit bd44605
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ use std::{fmt, ops, slice};

/// A floating-point number.
pub trait Float: Copy + fmt::Debug + PartialEq + PartialOrd + ops::Sub<Output = Self> {
#[doc(hidden)]
fn abs(&self) -> Self;

#[doc(hidden)]
fn is_finite(&self) -> bool;
}

/// One or more floating-point numbers.
pub trait Floats<T: Float> {
#[doc(hidden)]
fn floats(&self) -> &[T];
}

Expand Down

0 comments on commit bd44605

Please sign in to comment.