Skip to content

Commit

Permalink
Relax std::ops::Sub trait bound for Interval impl
Browse files Browse the repository at this point in the history
This trait bound is only necessary for width, move it accordingly.
  • Loading branch information
electronjoe committed Apr 17, 2019
1 parent 45f4864 commit d40e411
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/interval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ impl<T> Interval<T>
where
T: Copy,
T: std::cmp::PartialOrd,
T: std::ops::Sub,
{
/// Verify whether self contains the specified interval
///
Expand Down Expand Up @@ -464,7 +463,10 @@ where
/// # Ok(())
/// # }
/// ```
pub fn width(&self) -> Option<<T as std::ops::Sub>::Output> {
pub fn width(&self) -> Option<<T as std::ops::Sub>::Output>
where
T: std::ops::Sub,
{
let self_left_bound = self.to_left_bound();
let self_right_bound = self.to_right_bound();

Expand Down

0 comments on commit d40e411

Please sign in to comment.