Skip to content

Commit

Permalink
Fix compiler warning 'unnecessary parentheses around type' (#3175)
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinlesceller authored and antiochp committed Jan 6, 2020
1 parent 2bf4080 commit d31427f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions chain/src/txhashset/txhashset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ impl<'a> Extension<'a> {
}
}

fn apply_output(&mut self, out: &Output) -> Result<(u64), Error> {
fn apply_output(&mut self, out: &Output) -> Result<u64, Error> {
let commit = out.commitment();

if let Ok(pos) = self.batch.get_output_pos(&commit) {
Expand Down Expand Up @@ -1229,7 +1229,7 @@ impl<'a> Extension<'a> {
pub fn validate_kernel_sums(
&self,
genesis: &BlockHeader,
) -> Result<((Commitment, Commitment)), Error> {
) -> Result<(Commitment, Commitment), Error> {
let now = Instant::now();

let head_header = self.batch.get_block_header(&self.head.last_block_h)?;
Expand All @@ -1253,7 +1253,7 @@ impl<'a> Extension<'a> {
genesis: &BlockHeader,
fast_validation: bool,
status: &dyn TxHashsetWriteStatus,
) -> Result<((Commitment, Commitment)), Error> {
) -> Result<(Commitment, Commitment), Error> {
self.validate_mmrs()?;
self.validate_roots()?;
self.validate_sizes()?;
Expand Down
2 changes: 1 addition & 1 deletion core/src/core/committed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ pub trait Committed {
&self,
overage: i64,
kernel_offset: BlindingFactor,
) -> Result<((Commitment, Commitment)), Error> {
) -> Result<(Commitment, Commitment), Error> {
// Sum all input|output|overage commitments.
let utxo_sum = self.sum_commitments(overage)?;

Expand Down
4 changes: 2 additions & 2 deletions store/src/pmmr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl<T: PMMRable> Backend<T> for PMMRBackend<T> {
/// Get the hash at pos.
/// Return None if pos is a leaf and it has been removed (or pruned or
/// compacted).
fn get_hash(&self, pos: u64) -> Option<(Hash)> {
fn get_hash(&self, pos: u64) -> Option<Hash> {
if self.prunable && pmmr::is_leaf(pos) && !self.leaf_set.includes(pos) {
return None;
}
Expand All @@ -119,7 +119,7 @@ impl<T: PMMRable> Backend<T> for PMMRBackend<T> {

/// Get the data at pos.
/// Return None if it has been removed or if pos is not a leaf node.
fn get_data(&self, pos: u64) -> Option<(T::E)> {
fn get_data(&self, pos: u64) -> Option<T::E> {
if !pmmr::is_leaf(pos) {
return None;
}
Expand Down

0 comments on commit d31427f

Please sign in to comment.