impl From rather than Into

This commit is contained in:
Bennet Bleßmann
2025-07-31 21:38:26 +02:00
committed by Bennet Bleßmann
parent 6d7c217227
commit fae5e13bd5

View File

@@ -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
}
}