diff --git a/src/bin/rgb.rs b/src/bin/rgb.rs index f2d28ba7..2d2c2a54 100644 --- a/src/bin/rgb.rs +++ b/src/bin/rgb.rs @@ -393,7 +393,7 @@ fn main() -> Result<(), Error> { fs::write(psbt_out.unwrap_or(psbt_in), psbt_bytes)?; } PsbtCommand::Analyze { psbt } => { - let psbt_bytes = fs::read(&psbt)?; + let psbt_bytes = fs::read(psbt)?; let psbt = Psbt::deserialize(&psbt_bytes)?; println!("contracts:"); @@ -445,7 +445,7 @@ fn main() -> Result<(), Error> { println!( " - {}/{:#04x}/{}: {}", prefix, - u8::from(key.subtype), + key.subtype, key.key.to_hex(), value.to_hex() ); @@ -459,7 +459,7 @@ fn main() -> Result<(), Error> { println!( " - {}/{:#04x}/{}: {}", prefix, - u8::from(key.subtype), + key.subtype, key.key.to_hex(), value.to_hex() ); @@ -474,7 +474,7 @@ fn main() -> Result<(), Error> { println!( " - {}/{:#04x}/{}: {}", prefix, - u8::from(key.subtype), + key.subtype, key.key.to_hex(), value.to_hex() ); diff --git a/src/state.rs b/src/state.rs index b49b7650..41fc8516 100644 --- a/src/state.rs +++ b/src/state.rs @@ -203,7 +203,7 @@ impl ContractState { if owned_value.seal == outpoint { state.insert(OutpointState { node_outpoint: owned_value.outpoint, - state: owned_value.state.clone().into(), + state: owned_value.state.into(), }); } } @@ -243,7 +243,7 @@ impl ContractState { .or_default() .insert(OutpointState { node_outpoint: owned_value.outpoint, - state: owned_value.state.clone().into(), + state: owned_value.state.into(), }); } for owned_data in &self.owned_data { @@ -287,7 +287,7 @@ impl ContractState { .or_default() .insert(OutpointState { node_outpoint: owned_value.outpoint, - state: owned_value.state.clone().into(), + state: owned_value.state.into(), }); } }