mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-09 10:37:58 +00:00
Make DefaultByte implement Send + Sync (#3333)
* Make `DefaultByte` implement `Send + Sync` * Update runtime version.
This commit is contained in:
committed by
David Craven
parent
46709e8381
commit
ea58b7c92a
@@ -81,7 +81,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
// implementation changes and behavior does not, then leave spec_version as
|
||||
// is and increment impl_version.
|
||||
spec_version: 131,
|
||||
impl_version: 132,
|
||||
impl_version: 133,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ pub struct ModuleConstantMetadata {
|
||||
}
|
||||
|
||||
/// A technical trait to store lazy initiated vec value as static dyn pointer.
|
||||
pub trait DefaultByte {
|
||||
pub trait DefaultByte: Send + Sync {
|
||||
fn default_byte(&self) -> Vec<u8>;
|
||||
}
|
||||
|
||||
|
||||
@@ -1069,6 +1069,12 @@ fn store_functions_to_metadata (
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<#traitinstance: #traittype, #instance #bound_instantiable> Send
|
||||
for #struct_name<#traitinstance, #instance> #where_clause {}
|
||||
|
||||
unsafe impl<#traitinstance: #traittype, #instance #bound_instantiable> Sync
|
||||
for #struct_name<#traitinstance, #instance> #where_clause {}
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
impl<#traitinstance: #traittype, #instance #bound_instantiable> #scrate::metadata::DefaultByte
|
||||
for #struct_name<#traitinstance, #instance> #where_clause
|
||||
|
||||
@@ -1431,6 +1431,14 @@ macro_rules! __impl_module_constants_metadata {
|
||||
$crate::dispatch::Encode::encode(&value)
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<$const_trait_instance: 'static + $const_trait_name $(
|
||||
<I>, $const_instance: $const_instantiable)?
|
||||
> Send for $default_byte_name <$const_trait_instance $(, $const_instance)?> {}
|
||||
|
||||
unsafe impl<$const_trait_instance: 'static + $const_trait_name $(
|
||||
<I>, $const_instance: $const_instantiable)?
|
||||
> Sync for $default_byte_name <$const_trait_instance $(, $const_instance)?> {}
|
||||
)*
|
||||
&[
|
||||
$(
|
||||
|
||||
Reference in New Issue
Block a user