mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 13:21:10 +00:00
fix clippy (#715)
* fix clippy * remove used id in codegen * fix clippy again
This commit is contained in:
@@ -51,7 +51,7 @@ impl DecodeWithMetadata for DecodedValueThunk {
|
||||
metadata: &Metadata,
|
||||
) -> Result<Self::Target, Error> {
|
||||
let mut v = Vec::with_capacity(bytes.len());
|
||||
v.extend_from_slice(*bytes);
|
||||
v.extend_from_slice(bytes);
|
||||
*bytes = &[];
|
||||
Ok(DecodedValueThunk {
|
||||
type_id,
|
||||
|
||||
@@ -68,7 +68,7 @@ where
|
||||
|
||||
let event_bytes = client
|
||||
.rpc()
|
||||
.storage(&*system_events_key().0, Some(block_hash))
|
||||
.storage(&system_events_key().0, Some(block_hash))
|
||||
.await?
|
||||
.map(|e| e.0)
|
||||
.unwrap_or_else(Vec::new);
|
||||
|
||||
@@ -18,8 +18,8 @@ pub fn write_storage_address_root_bytes<Address: StorageAddress>(
|
||||
addr: &Address,
|
||||
out: &mut Vec<u8>,
|
||||
) {
|
||||
out.extend(&sp_core::twox_128(addr.pallet_name().as_bytes()));
|
||||
out.extend(&sp_core::twox_128(addr.entry_name().as_bytes()));
|
||||
out.extend(sp_core::twox_128(addr.pallet_name().as_bytes()));
|
||||
out.extend(sp_core::twox_128(addr.entry_name().as_bytes()));
|
||||
}
|
||||
|
||||
/// Outputs the [`storage_address_root_bytes`] as well as any additional bytes that represent
|
||||
|
||||
@@ -138,7 +138,7 @@ impl<'a> TxPayload for DynamicTxPayload<'a> {
|
||||
let pallet = metadata.pallet(&self.pallet_name)?;
|
||||
let call_id = pallet.call_ty_id().ok_or(MetadataError::CallNotFound)?;
|
||||
let call_value =
|
||||
Value::unnamed_variant(self.call_name.to_owned(), self.fields.clone());
|
||||
Value::unnamed_variant(self.call_name.clone(), self.fields.clone());
|
||||
|
||||
pallet.index().encode_to(out);
|
||||
scale_value::scale::encode_as_type(&call_value, call_id, metadata.types(), out)?;
|
||||
|
||||
Reference in New Issue
Block a user