Skip to content

Commit 50e44c7

Browse files
committed
Fix clippy::from_over_into
1 parent 90ac87c commit 50e44c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,9 +1124,9 @@ impl<T: FromStr + Clone + Integer> FromStr for Ratio<T> {
11241124
}
11251125
}
11261126

1127-
impl<T> Into<(T, T)> for Ratio<T> {
1128-
fn into(self) -> (T, T) {
1129-
(self.numer, self.denom)
1127+
impl<T> From<Ratio<T>> for (T, T) {
1128+
fn from(val: Ratio<T>) -> Self {
1129+
(val.numer, val.denom)
11301130
}
11311131
}
11321132

0 commit comments

Comments
 (0)