Skip to content

Commit

Permalink
Fix clippy::from_over_into
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Feb 8, 2024
1 parent 90ac87c commit 50e44c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1124,9 +1124,9 @@ impl<T: FromStr + Clone + Integer> FromStr for Ratio<T> {
}
}

impl<T> Into<(T, T)> for Ratio<T> {
fn into(self) -> (T, T) {
(self.numer, self.denom)
impl<T> From<Ratio<T>> for (T, T) {
fn from(val: Ratio<T>) -> Self {
(val.numer, val.denom)
}
}

Expand Down

0 comments on commit 50e44c7

Please sign in to comment.