mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 09:17:58 +00:00
storage-alias: Check that prefix is not an underscore (#11704)
Besides that it also adds some UI tests.
This commit is contained in:
@@ -512,6 +512,10 @@ fn generate_storage_instance(
|
||||
prefix_generics: Option<&TypeGenerics>,
|
||||
visibility: &Visibility,
|
||||
) -> Result<StorageInstance> {
|
||||
if let Some(ident) = prefix.get_ident().filter(|i| *i == "_") {
|
||||
return Err(Error::new(ident.span(), "`_` is not allowed as prefix by `storage_alias`."))
|
||||
}
|
||||
|
||||
let (pallet_prefix, impl_generics, type_generics) =
|
||||
if let Some((prefix_generics, storage_generics)) =
|
||||
prefix_generics.and_then(|p| storage_generics.map(|s| (p, s)))
|
||||
|
||||
Reference in New Issue
Block a user