@@ -361,9 +361,9 @@ macro_rules! parameter_types {
361
361
}
362
362
} ;
363
363
( IMPL_STORAGE $name: ident, $type: ty, $value: expr $( , $ty_params: ident) * ) => {
364
+ #[ allow( unused) ]
364
365
impl < $( $ty_params) ,* > $name< $( $ty_params) ,* > {
365
366
/// Returns the key for this parameter type.
366
- #[ allow( unused) ]
367
367
pub fn key( ) -> [ u8 ; 16 ] {
368
368
$crate:: sp_core_hashing_proc_macro:: twox_128!( b":" , $name, b":" )
369
369
}
@@ -372,7 +372,6 @@ macro_rules! parameter_types {
372
372
///
373
373
/// This needs to be executed in an externalities provided
374
374
/// environment.
375
- #[ allow( unused) ]
376
375
pub fn set( value: & $type) {
377
376
$crate:: storage:: unhashed:: put( & Self :: key( ) , value) ;
378
377
}
@@ -448,6 +447,7 @@ macro_rules! parameter_types_impl_thread_local {
448
447
}
449
448
450
449
/// Mutate the internal value in place.
450
+ #[ allow( unused) ]
451
451
pub fn mutate<R , F : FnOnce ( & mut $type) -> R >( mutate: F ) -> R {
452
452
let mut current = Self :: get( ) ;
453
453
let result = mutate( & mut current) ;
@@ -456,6 +456,7 @@ macro_rules! parameter_types_impl_thread_local {
456
456
}
457
457
458
458
/// Get current value and replace with initial value of the parameter type.
459
+ #[ allow( unused) ]
459
460
pub fn take( ) -> $type {
460
461
let current = Self :: get( ) ;
461
462
Self :: set( $value) ;
0 commit comments