We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cfdb6fa + 1a603df commit b63b80eCopy full SHA for b63b80e
src/time.rs
@@ -53,21 +53,21 @@ impl U32Ext for u32 {
53
}
54
55
56
-impl Into<Hertz> for KiloHertz {
57
- fn into(self) -> Hertz {
58
- Hertz(self.0 * 1_000)
+impl From<KiloHertz> for Hertz {
+ fn from(val: KiloHertz) -> Self {
+ Self(val.0 * 1_000)
59
60
61
62
-impl Into<Hertz> for MegaHertz {
63
64
- Hertz(self.0 * 1_000_000)
+impl From<MegaHertz> for Hertz {
+ fn from(val: MegaHertz) -> Self {
+ Self(val.0 * 1_000_000)
65
66
67
68
-impl Into<KiloHertz> for MegaHertz {
69
- fn into(self) -> KiloHertz {
70
- KiloHertz(self.0 * 1_000)
+impl From<MegaHertz> for KiloHertz {
71
72
73
0 commit comments