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)]
|
||||
fn into(self) -> CodeIndexOffset {
|
||||
self.0
|
||||
fn from(value: CodeIndex) -> CodeIndexOffset {
|
||||
value.0
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<CodeIndexOffset> for &'_ CodeIndex {
|
||||
impl From<&'_ CodeIndex> for CodeIndexOffset {
|
||||
#[inline(always)]
|
||||
fn into(self) -> CodeIndexOffset {
|
||||
self.0
|
||||
fn from(value: &'_ CodeIndex) -> CodeIndexOffset {
|
||||
value.0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user