chore: apply new lint warnings from latest clippy (#561)
This commit is contained in:
parent
106d8676b6
commit
3a614d2c91
23 changed files with 185 additions and 171 deletions
|
|
@ -121,7 +121,7 @@ mod tests {
|
|||
});
|
||||
|
||||
fn assert_script_data_hash_matches(bytes: &[u8], language_view: &LanguageView) {
|
||||
let tx = MultiEraTx::decode(&bytes).unwrap();
|
||||
let tx = MultiEraTx::decode(bytes).unwrap();
|
||||
let tx = tx.as_conway().unwrap();
|
||||
|
||||
let witness = conway::WitnessSet::from(tx.transaction_witness_set.clone().unwrap());
|
||||
|
|
|
|||
|
|
@ -696,7 +696,8 @@ impl BuiltTransaction {
|
|||
signature: Vec::from(signature.as_ref()).into(),
|
||||
});
|
||||
|
||||
tx.transaction_witness_set.vkeywitness = Some(NonEmptySet::from_vec(vkey_witnesses).unwrap());
|
||||
tx.transaction_witness_set.vkeywitness =
|
||||
Some(NonEmptySet::from_vec(vkey_witnesses).unwrap());
|
||||
|
||||
self.tx_bytes = tx.encode_fragment().unwrap().into();
|
||||
}
|
||||
|
|
@ -726,7 +727,7 @@ impl BuiltTransaction {
|
|||
let mut tx = conway::Tx::decode_fragment(&self.tx_bytes.0)
|
||||
.map_err(|_| TxBuilderError::CorruptedTxBytes)?;
|
||||
|
||||
let mut vkey_witnesses = tx
|
||||
let mut vkey_witnesses = tx
|
||||
.transaction_witness_set
|
||||
.vkeywitness
|
||||
.map(|x| x.to_vec())
|
||||
|
|
@ -734,7 +735,8 @@ impl BuiltTransaction {
|
|||
|
||||
vkey_witnesses.retain(|x| *x.vkey != pk.0.to_vec());
|
||||
|
||||
tx.transaction_witness_set.vkeywitness = Some(NonEmptySet::from_vec(vkey_witnesses).unwrap());
|
||||
tx.transaction_witness_set.vkeywitness =
|
||||
Some(NonEmptySet::from_vec(vkey_witnesses).unwrap());
|
||||
|
||||
self.tx_bytes = tx.encode_fragment().unwrap().into();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ impl<'de> Deserialize<'de> for Bytes32 {
|
|||
|
||||
struct Bytes32Visitor;
|
||||
|
||||
impl<'de> Visitor<'de> for Bytes32Visitor {
|
||||
impl Visitor<'_> for Bytes32Visitor {
|
||||
type Value = Bytes32;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
|
|
@ -73,7 +73,7 @@ impl<'de> Deserialize<'de> for Hash28 {
|
|||
|
||||
struct Hash28Visitor;
|
||||
|
||||
impl<'de> Visitor<'de> for Hash28Visitor {
|
||||
impl Visitor<'_> for Hash28Visitor {
|
||||
type Value = Hash28;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
|
|
@ -113,7 +113,7 @@ impl<'de> Deserialize<'de> for Bytes {
|
|||
|
||||
struct BytesVisitor;
|
||||
|
||||
impl<'de> Visitor<'de> for BytesVisitor {
|
||||
impl Visitor<'_> for BytesVisitor {
|
||||
type Value = Bytes;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
|
|
@ -265,7 +265,7 @@ impl<'de> Deserialize<'de> for RedeemerPurpose {
|
|||
|
||||
struct RedeemerPurposeVisitor;
|
||||
|
||||
impl<'de> Visitor<'de> for RedeemerPurposeVisitor {
|
||||
impl Visitor<'_> for RedeemerPurposeVisitor {
|
||||
type Value = RedeemerPurpose;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
|
|
@ -333,7 +333,7 @@ impl<'de> Deserialize<'de> for Address {
|
|||
|
||||
struct AddressVisitor;
|
||||
|
||||
impl<'de> Visitor<'de> for AddressVisitor {
|
||||
impl Visitor<'_> for AddressVisitor {
|
||||
type Value = Address;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
|
|
@ -370,7 +370,7 @@ impl<'de> Deserialize<'de> for Bytes64 {
|
|||
|
||||
struct Bytes64Visitor;
|
||||
|
||||
impl<'de> Visitor<'de> for Bytes64Visitor {
|
||||
impl Visitor<'_> for Bytes64Visitor {
|
||||
type Value = Bytes64;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue