]> Repositorios git - scryer-prolog.git/commitdiff
impl From rather than Into
authorBennet Bleßmann <[email protected]>
Thu, 31 Jul 2025 19:38:26 +0000 (21:38 +0200)
committerBennet Bleßmann <[email protected]>
Thu, 31 Jul 2025 19:47:05 +0000 (21:47 +0200)
src/machine/machine_indices.rs

index 07d77f6a36496f541edfe682312345265420ab4e..3c918883f85d36f9101bc1320cbc75d1af637f29 100644 (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
     }
 }