Skip to content

Commit a6c39b5

Browse files
committed
Fix clippy warning
1 parent d738d99 commit a6c39b5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/bin/rgb.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ fn main() -> Result<(), Error> {
393393
fs::write(psbt_out.unwrap_or(psbt_in), psbt_bytes)?;
394394
}
395395
PsbtCommand::Analyze { psbt } => {
396-
let psbt_bytes = fs::read(&psbt)?;
396+
let psbt_bytes = fs::read(psbt)?;
397397
let psbt = Psbt::deserialize(&psbt_bytes)?;
398398

399399
println!("contracts:");
@@ -445,7 +445,7 @@ fn main() -> Result<(), Error> {
445445
println!(
446446
" - {}/{:#04x}/{}: {}",
447447
prefix,
448-
u8::from(key.subtype),
448+
key.subtype,
449449
key.key.to_hex(),
450450
value.to_hex()
451451
);
@@ -459,7 +459,7 @@ fn main() -> Result<(), Error> {
459459
println!(
460460
" - {}/{:#04x}/{}: {}",
461461
prefix,
462-
u8::from(key.subtype),
462+
key.subtype,
463463
key.key.to_hex(),
464464
value.to_hex()
465465
);
@@ -474,7 +474,7 @@ fn main() -> Result<(), Error> {
474474
println!(
475475
" - {}/{:#04x}/{}: {}",
476476
prefix,
477-
u8::from(key.subtype),
477+
key.subtype,
478478
key.key.to_hex(),
479479
value.to_hex()
480480
);

src/state.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ impl ContractState {
203203
if owned_value.seal == outpoint {
204204
state.insert(OutpointState {
205205
node_outpoint: owned_value.outpoint,
206-
state: owned_value.state.clone().into(),
206+
state: owned_value.state.into(),
207207
});
208208
}
209209
}
@@ -243,7 +243,7 @@ impl ContractState {
243243
.or_default()
244244
.insert(OutpointState {
245245
node_outpoint: owned_value.outpoint,
246-
state: owned_value.state.clone().into(),
246+
state: owned_value.state.into(),
247247
});
248248
}
249249
for owned_data in &self.owned_data {
@@ -287,7 +287,7 @@ impl ContractState {
287287
.or_default()
288288
.insert(OutpointState {
289289
node_outpoint: owned_value.outpoint,
290-
state: owned_value.state.clone().into(),
290+
state: owned_value.state.into(),
291291
});
292292
}
293293
}

0 commit comments

Comments
 (0)