mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +00:00
Restructure frame_support macro related exports (#14745)
* make reexports private * make reexports private 2 * make reexports private for runtime-benchmarking * make reexports private for try-runtime * fix for try-runtime * make reexports private for tests * fmt * make reexports private for tests * make reexports private for experimental * fix beefy * fix ui test * fix ui test * fix benches * ".git/.scripts/commands/fmt/fmt.sh" * fix contracts use * wip * wip * do not reexport sp_api::metadata_ir * fix CI checks * fix support tests * ".git/.scripts/commands/fmt/fmt.sh" * Update frame/support/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * import codec directly * fmt * fix node-cli tests --------- Co-authored-by: command-bot <> Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -103,7 +103,7 @@ macro_rules! impl_filter_stack {
|
||||
mod $module {
|
||||
#[allow(unused_imports)]
|
||||
use super::*;
|
||||
use $crate::sp_std::{boxed::Box, cell::RefCell, mem::{swap, take}, vec::Vec};
|
||||
use $crate::__private::sp_std::{boxed::Box, cell::RefCell, mem::{swap, take}, vec::Vec};
|
||||
use $crate::traits::filter::{Contains, FilterStack};
|
||||
|
||||
thread_local! {
|
||||
|
||||
@@ -42,7 +42,7 @@ pub const DEFENSIVE_OP_INTERNAL_ERROR: &str = "Defensive failure has been trigge
|
||||
#[macro_export]
|
||||
macro_rules! defensive {
|
||||
() => {
|
||||
frame_support::log::error!(
|
||||
frame_support::__private::log::error!(
|
||||
target: "runtime",
|
||||
"{}",
|
||||
$crate::traits::DEFENSIVE_OP_PUBLIC_ERROR
|
||||
@@ -50,7 +50,7 @@ macro_rules! defensive {
|
||||
debug_assert!(false, "{}", $crate::traits::DEFENSIVE_OP_INTERNAL_ERROR);
|
||||
};
|
||||
($error:expr $(,)?) => {
|
||||
frame_support::log::error!(
|
||||
frame_support::__private::log::error!(
|
||||
target: "runtime",
|
||||
"{}: {:?}",
|
||||
$crate::traits::DEFENSIVE_OP_PUBLIC_ERROR,
|
||||
@@ -59,7 +59,7 @@ macro_rules! defensive {
|
||||
debug_assert!(false, "{}: {:?}", $crate::traits::DEFENSIVE_OP_INTERNAL_ERROR, $error);
|
||||
};
|
||||
($error:expr, $proof:expr $(,)?) => {
|
||||
frame_support::log::error!(
|
||||
frame_support::__private::log::error!(
|
||||
target: "runtime",
|
||||
"{}: {:?}: {:?}",
|
||||
$crate::traits::DEFENSIVE_OP_PUBLIC_ERROR,
|
||||
|
||||
@@ -279,7 +279,8 @@ impl StorePreimage for () {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::{bounded_vec, BoundedVec};
|
||||
use crate::BoundedVec;
|
||||
use sp_runtime::bounded_vec;
|
||||
|
||||
#[test]
|
||||
fn bounded_size_is_correct() {
|
||||
|
||||
@@ -17,11 +17,10 @@
|
||||
|
||||
//! Traits for encoding data related to pallet's storage items.
|
||||
|
||||
use crate::sp_std::collections::btree_set::BTreeSet;
|
||||
use impl_trait_for_tuples::impl_for_tuples;
|
||||
pub use sp_core::storage::TrackedStorageKey;
|
||||
use sp_runtime::traits::Saturating;
|
||||
use sp_std::prelude::*;
|
||||
use sp_runtime::{traits::Saturating, RuntimeDebug};
|
||||
use sp_std::{collections::btree_set::BTreeSet, prelude::*};
|
||||
|
||||
/// An instance of a pallet in the storage.
|
||||
///
|
||||
@@ -61,7 +60,7 @@ pub trait StorageInstance {
|
||||
|
||||
/// Metadata about storage from the runtime.
|
||||
#[derive(
|
||||
codec::Encode, codec::Decode, crate::RuntimeDebug, Eq, PartialEq, Clone, scale_info::TypeInfo,
|
||||
codec::Encode, codec::Decode, RuntimeDebug, Eq, PartialEq, Clone, scale_info::TypeInfo,
|
||||
)]
|
||||
pub struct StorageInfo {
|
||||
/// Encoded string of pallet name.
|
||||
|
||||
@@ -175,7 +175,7 @@ impl<BlockNumber: Clone + sp_std::fmt::Debug + AtLeast32BitUnsigned> TryState<Bl
|
||||
{
|
||||
result = result.and(try_state_fn(n.clone(), targets.clone()));
|
||||
} else {
|
||||
crate::log::warn!(
|
||||
log::warn!(
|
||||
"Pallet {:?} not found",
|
||||
sp_std::str::from_utf8(pallet_name).unwrap_or_default()
|
||||
);
|
||||
|
||||
@@ -210,8 +210,8 @@ pub trait KeyOwnerProofSystem<Key> {
|
||||
impl<Key> KeyOwnerProofSystem<Key> for () {
|
||||
// The proof and identification tuples is any bottom type to guarantee that the methods of this
|
||||
// implementation can never be called or return anything other than `None`.
|
||||
type Proof = crate::Void;
|
||||
type IdentificationTuple = crate::Void;
|
||||
type Proof = sp_core::Void;
|
||||
type IdentificationTuple = sp_core::Void;
|
||||
|
||||
fn prove(_key: Key) -> Option<Self::Proof> {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user