chore: Fix lint warnings (#190)

* apply code formatting
* fix clippy warnings
This commit is contained in:
Santiago Carmuega 2022-09-13 08:41:43 -03:00 committed by GitHub
parent 85cf02dec4
commit 6b2f23059f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View file

@ -143,7 +143,7 @@ impl ShelleyPaymentPart {
Self::Script(x) => x.to_vec(),
}
}
pub fn to_hex(&self) -> String {
let bytes = self.to_vec();
hex::encode(bytes)
@ -152,7 +152,7 @@ impl ShelleyPaymentPart {
pub fn to_bech32(&self) -> Result<String, Error> {
let hrp = match self {
Self::Key(_) => "addr_vkh",
Self::Script(_) => "addr_shared_vkh"
Self::Script(_) => "addr_shared_vkh",
};
let bytes = self.to_vec();
encode_bech32(&bytes, hrp)
@ -205,7 +205,7 @@ impl ShelleyDelegationPart {
Self::Null => vec![],
}
}
pub fn to_hex(&self) -> String {
let bytes = self.to_vec();
hex::encode(bytes)

View file

@ -1412,7 +1412,7 @@ impl<'b> From<MintedBlock<'b>> for Block {
.to_vec()
.into_iter()
.map(|x| x.unwrap())
.map(|x| WitnessSet::from(x))
.map(WitnessSet::from)
.collect(),
auxiliary_data_set: x
.auxiliary_data_set

View file

@ -609,7 +609,7 @@ impl<'b> From<MintedBlock<'b>> for Block {
.to_vec()
.into_iter()
.map(|x| x.unwrap())
.map(|x| WitnessSet::from(x))
.map(WitnessSet::from)
.collect(),
auxiliary_data_set: x
.auxiliary_data_set

View file

@ -81,7 +81,7 @@ impl ComputeHash<32> for alonzo::PlutusData {
impl OriginalHash<32> for KeepRaw<'_, alonzo::PlutusData> {
fn original_hash(&self) -> Hash<32> {
Hasher::<256>::hash(&self.raw_cbor())
Hasher::<256>::hash(self.raw_cbor())
}
}