Skip to content

Commit a079954

Browse files
committed
fix problematic cases
1 parent 4c05546 commit a079954

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

pallets/commitments/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub mod types;
1010
pub mod weights;
1111

1212
pub use pallet::*;
13-
use subtensor_macros::freeze_struct;
13+
use subtensor_macros::freeze_struct_ignore_ra;
1414
pub use types::*;
1515
pub use weights::WeightInfo;
1616

@@ -210,7 +210,7 @@ use {
210210
},
211211
};
212212

213-
#[freeze_struct("6a00398e14a8a984")]
213+
#[freeze_struct_ignore_ra("6a00398e14a8a984")]
214214
#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)]
215215
pub struct CommitmentsSignedExtension<T: Config + Send + Sync + TypeInfo>(pub PhantomData<T>);
216216

pallets/registry/src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use sp_runtime::{
3030
RuntimeDebug,
3131
};
3232
use sp_std::{fmt::Debug, iter::once, ops::Add, prelude::*};
33-
use subtensor_macros::freeze_struct;
33+
use subtensor_macros::freeze_struct_ignore_ra;
3434

3535
/// Either underlying data blob if it is at most 32 bytes, or a hash of it. If the data is greater
3636
/// than 32-bytes then it will be truncated when encoding.
@@ -279,7 +279,7 @@ impl TypeInfo for IdentityFields {
279279
///
280280
/// NOTE: This should be stored at the end of the storage item to facilitate the addition of extra
281281
/// fields in a backwards compatible way through a specialized `Decode` impl.
282-
#[freeze_struct("fa02e2abde778fc4")]
282+
#[freeze_struct_ignore_ra("fa02e2abde778fc4")]
283283
#[derive(
284284
CloneNoBound, Encode, Decode, Eq, MaxEncodedLen, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo,
285285
)]

support/macros/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,5 @@ fn freeze_struct_impl(
7575

7676
/// Returns true if the current build is being run by rust-analyzer.
7777
fn is_rust_analyzer() -> bool {
78-
std::env::var("RUSTC_WRAPPER")
79-
.map(|v| v.contains("rust-analyzer"))
80-
.unwrap_or(false)
78+
std::env!("RUSTC_WRAPPER").contains("rust-analyzer")
8179
}

0 commit comments

Comments
 (0)