impl From rather than Into
This commit is contained in:
committed by
Bennet Bleßmann
parent
6d7c217227
commit
fae5e13bd5
@@ -159,17 +159,17 @@ impl From<CodeIndexOffset> for CodeIndex {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Into<CodeIndexOffset> for CodeIndex {
|
impl From<CodeIndex> for CodeIndexOffset {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn into(self) -> CodeIndexOffset {
|
fn from(value: CodeIndex) -> CodeIndexOffset {
|
||||||
self.0
|
value.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Into<CodeIndexOffset> for &'_ CodeIndex {
|
impl From<&'_ CodeIndex> for CodeIndexOffset {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn into(self) -> CodeIndexOffset {
|
fn from(value: &'_ CodeIndex) -> CodeIndexOffset {
|
||||||
self.0
|
value.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user