diff --git a/frame/asset-conversion/src/lib.rs b/frame/asset-conversion/src/lib.rs index 8802f4de9b78f..c97ab537a945f 100644 --- a/frame/asset-conversion/src/lib.rs +++ b/frame/asset-conversion/src/lib.rs @@ -111,7 +111,7 @@ pub mod pallet { use sp_std::prelude::*; #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::config] pub trait Config: frame_system::Config { diff --git a/frame/atomic-swap/src/lib.rs b/frame/atomic-swap/src/lib.rs index ed89a88698a3c..2d93887b82596 100644 --- a/frame/atomic-swap/src/lib.rs +++ b/frame/atomic-swap/src/lib.rs @@ -184,7 +184,7 @@ pub mod pallet { } #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::storage] pub type PendingSwaps = StorageDoubleMap< diff --git a/frame/beefy/src/lib.rs b/frame/beefy/src/lib.rs index d188226c3739e..d56d5b32f8f36 100644 --- a/frame/beefy/src/lib.rs +++ b/frame/beefy/src/lib.rs @@ -112,7 +112,7 @@ pub mod pallet { } #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); /// The current authorities set #[pallet::storage] diff --git a/frame/benchmarking/pov/src/lib.rs b/frame/benchmarking/pov/src/lib.rs index 66000e54151b0..eb02ccc983c09 100644 --- a/frame/benchmarking/pov/src/lib.rs +++ b/frame/benchmarking/pov/src/lib.rs @@ -32,7 +32,7 @@ pub mod pallet { use sp_std::prelude::*; #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::config] pub trait Config: frame_system::Config { diff --git a/frame/benchmarking/src/tests.rs b/frame/benchmarking/src/tests.rs index 8694c78cb9dff..c3f51aeb53d5a 100644 --- a/frame/benchmarking/src/tests.rs +++ b/frame/benchmarking/src/tests.rs @@ -35,7 +35,7 @@ mod pallet_test { use frame_system::pallet_prelude::*; #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::config] pub trait Config: frame_system::Config { diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 42691d4b01dc7..1812dce4b121f 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -129,7 +129,7 @@ use pallet_contracts_primitives::{ use scale_info::TypeInfo; use smallvec::Array; use sp_runtime::traits::{Convert, Hash, Saturating, StaticLookup, Zero}; -use sp_std::{fmt::Debug, marker::PhantomData, prelude::*}; +use sp_std::{fmt::Debug, prelude::*}; pub use crate::{ address::{AddressGenerator, DefaultAddressGenerator}, @@ -191,7 +191,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::config] pub trait Config: frame_system::Config { diff --git a/frame/election-provider-multi-phase/src/lib.rs b/frame/election-provider-multi-phase/src/lib.rs index 98fa880349eeb..1960c458b983e 100644 --- a/frame/election-provider-multi-phase/src/lib.rs +++ b/frame/election-provider-multi-phase/src/lib.rs @@ -1343,7 +1343,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::without_storage_info] #[pallet::storage_version(STORAGE_VERSION)] - pub struct Pallet(PhantomData); + pub struct Pallet(_); } impl Pallet { diff --git a/frame/elections-phragmen/src/lib.rs b/frame/elections-phragmen/src/lib.rs index 559a024638e39..ee8bcc1de50a4 100644 --- a/frame/elections-phragmen/src/lib.rs +++ b/frame/elections-phragmen/src/lib.rs @@ -192,7 +192,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] #[pallet::without_storage_info] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::config] pub trait Config: frame_system::Config { diff --git a/frame/indices/src/lib.rs b/frame/indices/src/lib.rs index 56e177da3148f..bcc47c0089bb8 100644 --- a/frame/indices/src/lib.rs +++ b/frame/indices/src/lib.rs @@ -75,7 +75,7 @@ pub mod pallet { } #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::call] impl Pallet { diff --git a/frame/nft-fractionalization/src/lib.rs b/frame/nft-fractionalization/src/lib.rs index 459d89f5a8146..a6417cc3857d4 100644 --- a/frame/nft-fractionalization/src/lib.rs +++ b/frame/nft-fractionalization/src/lib.rs @@ -86,7 +86,7 @@ pub mod pallet { use sp_std::{fmt::Display, prelude::*}; #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::config] pub trait Config: frame_system::Config { diff --git a/frame/preimage/src/lib.rs b/frame/preimage/src/lib.rs index 60208424db953..5ab1e7643b2e7 100644 --- a/frame/preimage/src/lib.rs +++ b/frame/preimage/src/lib.rs @@ -108,7 +108,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] diff --git a/frame/scheduler/src/mock.rs b/frame/scheduler/src/mock.rs index adb54fd78b181..1b0fb8112469c 100644 --- a/frame/scheduler/src/mock.rs +++ b/frame/scheduler/src/mock.rs @@ -50,7 +50,7 @@ pub mod logger { } #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::hooks] impl Hooks> for Pallet {} diff --git a/frame/sudo/src/lib.rs b/frame/sudo/src/lib.rs index 50eb83810d55e..a41e479b6154d 100644 --- a/frame/sudo/src/lib.rs +++ b/frame/sudo/src/lib.rs @@ -59,7 +59,7 @@ //! use frame_system::pallet_prelude::*; //! //! #[pallet::pallet] -//! pub struct Pallet(PhantomData); +//! pub struct Pallet(_); //! //! #[pallet::config] //! pub trait Config: frame_system::Config {} @@ -141,7 +141,7 @@ pub mod pallet { } #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::call] impl Pallet { diff --git a/frame/sudo/src/mock.rs b/frame/sudo/src/mock.rs index 95a6507c12dd5..856cb35c8718c 100644 --- a/frame/sudo/src/mock.rs +++ b/frame/sudo/src/mock.rs @@ -39,7 +39,7 @@ pub mod logger { } #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::call] impl Pallet { diff --git a/frame/support/src/dispatch.rs b/frame/support/src/dispatch.rs index 8164b8361af87..60404748a7cf2 100644 --- a/frame/support/src/dispatch.rs +++ b/frame/support/src/dispatch.rs @@ -3582,7 +3582,7 @@ mod weight_tests { use crate::pallet_prelude::*; #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::config] #[pallet::disable_frame_system_supertrait_check] diff --git a/frame/support/src/lib.rs b/frame/support/src/lib.rs index 8f3f27538a907..8c2fd4fb62e37 100644 --- a/frame/support/src/lib.rs +++ b/frame/support/src/lib.rs @@ -848,7 +848,7 @@ pub mod tests { use crate::pallet_prelude::*; #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::config] #[pallet::disable_frame_system_supertrait_check] diff --git a/frame/support/src/storage/generator/mod.rs b/frame/support/src/storage/generator/mod.rs index 3ca8a1fc27236..349f5de3ef3bc 100644 --- a/frame/support/src/storage/generator/mod.rs +++ b/frame/support/src/storage/generator/mod.rs @@ -53,7 +53,7 @@ mod tests { use crate::pallet_prelude::*; #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::config] #[pallet::disable_frame_system_supertrait_check] diff --git a/frame/support/test/tests/final_keys.rs b/frame/support/test/tests/final_keys.rs index 610f6532c52d0..f56a6c9fcaaa1 100644 --- a/frame/support/test/tests/final_keys.rs +++ b/frame/support/test/tests/final_keys.rs @@ -34,7 +34,7 @@ mod no_instance { use frame_support_test as frame_system; #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::config] pub trait Config: frame_system::Config {} diff --git a/frame/support/test/tests/genesisconfig.rs b/frame/support/test/tests/genesisconfig.rs index 48904baf1ad62..291b250c146b2 100644 --- a/frame/support/test/tests/genesisconfig.rs +++ b/frame/support/test/tests/genesisconfig.rs @@ -28,7 +28,7 @@ pub mod pallet { use frame_support_test as frame_system; #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::config] pub trait Config: frame_system::Config {} diff --git a/frame/support/test/tests/issue2219.rs b/frame/support/test/tests/issue2219.rs index eac67af274f87..3822fea030d15 100644 --- a/frame/support/test/tests/issue2219.rs +++ b/frame/support/test/tests/issue2219.rs @@ -80,7 +80,7 @@ mod module { } #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::config] pub trait Config: frame_system::Config + TypeInfo {} diff --git a/frame/timestamp/src/lib.rs b/frame/timestamp/src/lib.rs index 192c81502bf6e..e707764beb95c 100644 --- a/frame/timestamp/src/lib.rs +++ b/frame/timestamp/src/lib.rs @@ -151,7 +151,7 @@ pub mod pallet { } #[pallet::pallet] - pub struct Pallet(PhantomData); + pub struct Pallet(_); /// Current time for the current block. #[pallet::storage] diff --git a/test-utils/runtime/src/substrate_test_pallet.rs b/test-utils/runtime/src/substrate_test_pallet.rs index 20467523f7375..0864c952b70c4 100644 --- a/test-utils/runtime/src/substrate_test_pallet.rs +++ b/test-utils/runtime/src/substrate_test_pallet.rs @@ -45,7 +45,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::without_storage_info] - pub struct Pallet(PhantomData); + pub struct Pallet(_); #[pallet::config] pub trait Config: frame_system::Config {} diff --git a/utils/frame/rpc/support/src/lib.rs b/utils/frame/rpc/support/src/lib.rs index eecc80c408efd..431bcdab03288 100644 --- a/utils/frame/rpc/support/src/lib.rs +++ b/utils/frame/rpc/support/src/lib.rs @@ -94,7 +94,7 @@ use sp_storage::{StorageData, StorageKey}; /// use frame_support::pallet_prelude::*; /// /// #[pallet::pallet] -/// pub struct Pallet(PhantomData); +/// pub struct Pallet(_); /// /// #[pallet::config] /// pub trait Config: frame_system::Config {}