mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 13:51:05 +00:00
subxt: use utils from core
This commit is contained in:
+2
-2
@@ -15,8 +15,8 @@ description = "Sign extrinsics to be submitted by Subxt"
|
||||
keywords = ["parity", "subxt", "extrinsic", "no-std"]
|
||||
|
||||
[features]
|
||||
# default = ["std"]
|
||||
std = []
|
||||
default = ["std"]
|
||||
std = ["scale-info/std", "scale-value/std", "scale-bits/std", "scale-decode/std", "scale-encode/std", "frame-metadata/std", "subxt-metadata/std"]
|
||||
substrate-compat = ["sp-core", "sp-runtime"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -44,7 +44,7 @@ impl codec::Encode for Encoded {
|
||||
|
||||
/// Decodes a compact encoded value from the beginning of the provided bytes,
|
||||
/// returning the value and any remaining bytes.
|
||||
pub(crate) fn strip_compact_prefix(bytes: &[u8]) -> Result<(u64, &[u8]), codec::Error> {
|
||||
pub fn strip_compact_prefix(bytes: &[u8]) -> Result<(u64, &[u8]), codec::Error> {
|
||||
let cursor = &mut &*bytes;
|
||||
let val = <Compact<u64>>::decode(cursor)?;
|
||||
Ok((val.0, *cursor))
|
||||
@@ -67,7 +67,7 @@ pub(crate) fn strip_compact_prefix(bytes: &[u8]) -> Result<(u64, &[u8]), codec::
|
||||
pub struct PhantomDataSendSync<T>(core::marker::PhantomData<T>);
|
||||
|
||||
impl<T> PhantomDataSendSync<T> {
|
||||
pub(crate) fn new() -> Self {
|
||||
pub fn new() -> Self {
|
||||
Self(core::marker::PhantomData)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user