File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -141,21 +141,21 @@ impl U32Ext for u32 {
141141 }
142142}
143143
144- impl Into < Hertz > for KiloHertz {
145- fn into ( self ) -> Hertz {
146- Hertz ( self . 0 * 1_000 )
144+ impl From < KiloHertz > for Hertz {
145+ fn from ( val : KiloHertz ) -> Self {
146+ Self ( val . 0 * 1_000 )
147147 }
148148}
149149
150- impl Into < Hertz > for MegaHertz {
151- fn into ( self ) -> Hertz {
152- Hertz ( self . 0 * 1_000_000 )
150+ impl From < MegaHertz > for Hertz {
151+ fn from ( val : MegaHertz ) -> Self {
152+ Self ( val . 0 * 1_000_000 )
153153 }
154154}
155155
156- impl Into < KiloHertz > for MegaHertz {
157- fn into ( self ) -> KiloHertz {
158- KiloHertz ( self . 0 * 1_000 )
156+ impl From < MegaHertz > for KiloHertz {
157+ fn from ( val : MegaHertz ) -> Self {
158+ Self ( val . 0 * 1_000 )
159159 }
160160}
161161
You can’t perform that action at this time.
0 commit comments