Fix todo
in ethcore/types::Receipt
constructor (#9086)
Remove needless mutable variable and assignment
This commit is contained in:
parent
a9c93c797d
commit
edb228839e
@ -20,7 +20,7 @@ use ethereum_types::{H160, H256, U256, Address, Bloom};
|
|||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use rlp::{Rlp, RlpStream, Encodable, Decodable, DecoderError};
|
use rlp::{Rlp, RlpStream, Encodable, Decodable, DecoderError};
|
||||||
|
|
||||||
use {BlockNumber};
|
use BlockNumber;
|
||||||
use log_entry::{LogEntry, LocalizedLogEntry};
|
use log_entry::{LogEntry, LocalizedLogEntry};
|
||||||
|
|
||||||
/// Transaction outcome store in the receipt.
|
/// Transaction outcome store in the receipt.
|
||||||
@ -49,12 +49,12 @@ pub struct Receipt {
|
|||||||
|
|
||||||
impl Receipt {
|
impl Receipt {
|
||||||
/// Create a new receipt.
|
/// Create a new receipt.
|
||||||
pub fn new(outcome: TransactionOutcome, gas_used: U256, logs: Vec<LogEntry>) -> Receipt {
|
pub fn new(outcome: TransactionOutcome, gas_used: U256, logs: Vec<LogEntry>) -> Self {
|
||||||
Receipt {
|
Self {
|
||||||
gas_used: gas_used,
|
gas_used,
|
||||||
log_bloom: logs.iter().fold(Bloom::default(), |mut b, l| { b = &b | &l.bloom(); b }), //TODO: use |= operator
|
log_bloom: logs.iter().fold(Bloom::default(), |b, l| b | l.bloom()),
|
||||||
logs: logs,
|
logs,
|
||||||
outcome: outcome,
|
outcome,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user