Skip to content

Commit dd28a12

Browse files
committed
Remove redundant chain_err context now that deserialize_value reports type_name
1 parent 317a57e commit dd28a12

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/daemon.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ fn header_from_value(value: Value) -> Result<BlockHeader> {
6464
let header_hex = value
6565
.as_str()
6666
.chain_err(|| format!("non-string header: {}", value))?;
67-
deserialize_value(header_hex).chain_err(|| format!("failed to parse header {}", header_hex))
67+
deserialize_value(header_hex)
6868
}
6969

7070
fn block_from_value(value: Value) -> Result<Block> {
7171
let block_hex = value.as_str().chain_err(|| "non-string block")?;
72-
deserialize_value(block_hex).chain_err(|| format!("failed to parse block {}", block_hex))
72+
deserialize_value(block_hex)
7373
}
7474

7575
fn tx_from_value(value: Value) -> Result<Transaction> {
7676
let tx_hex = value.as_str().chain_err(|| "non-string tx")?;
77-
deserialize_value(tx_hex).chain_err(|| format!("failed to parse tx {}", tx_hex))
77+
deserialize_value(tx_hex)
7878
}
7979

8080
#[cfg(not(feature = "liquid"))]

0 commit comments

Comments
 (0)