Repository: ergoplatform/sigma-rust (language: rust)

Issue:
Implement From<BoxId> for DataInput



Discussion / hints:

Fix patch:
diff --git a/ergo-lib/src/chain/data_input.rs b/ergo-lib/src/chain/data_input.rs
index 32cee91c6..fabec954a 100644
--- a/ergo-lib/src/chain/data_input.rs
+++ b/ergo-lib/src/chain/data_input.rs
@@ -2,7 +2,7 @@
 
 use std::io;
 
-use super::ergo_box::{box_id::BoxId, ErgoBox};
+use super::ergo_box::box_id::BoxId;
 use crate::serialization::{
     sigma_byte_reader::SigmaByteRead, sigma_byte_writer::SigmaByteWrite, SerializationError,
     SigmaSerializable,
@@ -24,9 +24,9 @@ pub struct DataInput {
     pub box_id: BoxId,
 }
 
-impl From<&ErgoBox> for DataInput {
-    fn from(b: &ErgoBox) -> Self {
-        DataInput { box_id: b.box_id() }
+impl From<BoxId> for DataInput {
+    fn from(box_id: BoxId) -> Self {
+        DataInput { box_id }
     }
 }
 


Test patch: