chain: remove clippy::try_error annotation
This commit is contained in:
parent
dcc1e19129
commit
fd548592bf
|
@ -53,10 +53,10 @@ impl Block {
|
||||||
.ok_or_else(|| "block has no transactions")?;
|
.ok_or_else(|| "block has no transactions")?;
|
||||||
let mut rest = self.transactions.iter().skip(1);
|
let mut rest = self.transactions.iter().skip(1);
|
||||||
if !first.is_coinbase() {
|
if !first.is_coinbase() {
|
||||||
Err("first transaction must be coinbase")?;
|
return Err("first transaction must be coinbase".into());
|
||||||
}
|
}
|
||||||
if rest.any(|tx| tx.contains_coinbase_input()) {
|
if rest.any(|tx| tx.contains_coinbase_input()) {
|
||||||
Err("coinbase input found in non-coinbase transaction")?;
|
return Err("coinbase input found in non-coinbase transaction".into());
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ impl BlockHeader {
|
||||||
if self.time <= two_hours_in_the_future {
|
if self.time <= two_hours_in_the_future {
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
Err("block header time is more than 2 hours in the future")?
|
Err("block header time is more than 2 hours in the future".into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#![doc(html_favicon_url = "https://www.zfnd.org/images/zebra-favicon-128.png")]
|
#![doc(html_favicon_url = "https://www.zfnd.org/images/zebra-favicon-128.png")]
|
||||||
#![doc(html_logo_url = "https://www.zfnd.org/images/zebra-icon.png")]
|
#![doc(html_logo_url = "https://www.zfnd.org/images/zebra-icon.png")]
|
||||||
#![doc(html_root_url = "https://doc.zebra.zfnd.org/zebra_chain")]
|
#![doc(html_root_url = "https://doc.zebra.zfnd.org/zebra_chain")]
|
||||||
#![allow(clippy::try_err)]
|
|
||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
|
Loading…
Reference in New Issue