mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Update to 2024 edition (#2001)
* Update to 2024 edition * Update to 2024 edition; fmt, use<> and remove refs * async functions
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
use crate::metadata::{DecodeWithMetadata, Metadata};
|
||||
use core::fmt::Debug;
|
||||
use scale_decode::{visitor::DecodeAsTypeResult, DecodeAsType, TypeResolver};
|
||||
use scale_decode::{DecodeAsType, TypeResolver, visitor::DecodeAsTypeResult};
|
||||
|
||||
use std::{borrow::Cow, marker::PhantomData};
|
||||
|
||||
@@ -73,7 +73,9 @@ pub enum TokenError {
|
||||
#[error("Funds are unavailable.")]
|
||||
FundsUnavailable,
|
||||
/// Some part of the balance gives the only provider reference to the account and thus cannot be (re)moved.
|
||||
#[error("Some part of the balance gives the only provider reference to the account and thus cannot be (re)moved.")]
|
||||
#[error(
|
||||
"Some part of the balance gives the only provider reference to the account and thus cannot be (re)moved."
|
||||
)]
|
||||
OnlyProvider,
|
||||
/// Account cannot exist with the funds that would be given.
|
||||
#[error("Account cannot exist with the funds that would be given.")]
|
||||
@@ -327,7 +329,9 @@ impl DispatchError {
|
||||
module_bytes[4],
|
||||
]
|
||||
} else {
|
||||
tracing::warn!("Can't decode error sp_runtime::DispatchError: bytes do not match known shapes");
|
||||
tracing::warn!(
|
||||
"Can't decode error sp_runtime::DispatchError: bytes do not match known shapes"
|
||||
);
|
||||
// Return _all_ of the bytes; every "unknown" return should be consistent.
|
||||
return Err(super::Error::Unknown(bytes.to_vec()));
|
||||
};
|
||||
|
||||
@@ -170,7 +170,9 @@ pub enum BlockError {
|
||||
#[error("Could not find a block with hash {0} (perhaps it was on a non-finalized fork?)")]
|
||||
NotFound(String),
|
||||
/// Leftover bytes found after decoding the extrinsic.
|
||||
#[error("After decoding the exntrinsic at index {extrinsic_index}, {num_leftover_bytes} bytes were left, suggesting that decoding may have failed")]
|
||||
#[error(
|
||||
"After decoding the exntrinsic at index {extrinsic_index}, {num_leftover_bytes} bytes were left, suggesting that decoding may have failed"
|
||||
)]
|
||||
LeftoverBytes {
|
||||
/// Index of the extrinsic that failed to decode.
|
||||
extrinsic_index: usize,
|
||||
@@ -222,7 +224,9 @@ impl BlockError {
|
||||
pub enum TransactionError {
|
||||
/// The block hash that the transaction was added to could not be found.
|
||||
/// This is probably because the block was retracted before being finalized.
|
||||
#[error("The block containing the transaction can no longer be found (perhaps it was on a non-finalized fork?)")]
|
||||
#[error(
|
||||
"The block containing the transaction can no longer be found (perhaps it was on a non-finalized fork?)"
|
||||
)]
|
||||
BlockNotFound,
|
||||
/// An error happened on the node that the transaction was submitted to.
|
||||
#[error("Error handling transaction: {0}")]
|
||||
|
||||
Reference in New Issue
Block a user