chore: Fix linter warnings (#194)

This commit is contained in:
Santiago Carmuega 2022-09-21 18:44:03 -03:00 committed by GitHub
parent 7246ef52da
commit 4264a9739a

View file

@ -242,22 +242,12 @@ impl<'b> MultiEraTx<'b> {
/// the txouts (Babbage spec, ch 4). /// the txouts (Babbage spec, ch 4).
pub fn produces(&self) -> Vec<(usize, MultiEraOutput)> { pub fn produces(&self) -> Vec<(usize, MultiEraOutput)> {
match self.is_valid() { match self.is_valid() {
true => { true => self.outputs().into_iter().enumerate().collect(),
self false => self
.outputs()
.into_iter()
.enumerate()
.collect()
}
false => {
self
.collateral_return() .collateral_return()
.into_iter() .into_iter()
.map(|txo| { .map(|txo| (self.outputs().len(), txo))
(self.outputs().len(), txo) .collect(),
})
.collect()
}
} }
} }