mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-08 12:27:22 +00:00
Macros to use path instead of ident (#1474)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use frame_support_procedural_tools::generate_crate_access_2018;
|
||||
use frame_support_procedural_tools::generate_access_from_frame_or_crate;
|
||||
use quote::ToTokens;
|
||||
|
||||
// Derive `PalletError`
|
||||
@@ -25,7 +25,7 @@ pub fn derive_pallet_error(input: proc_macro::TokenStream) -> proc_macro::TokenS
|
||||
Err(e) => return e.to_compile_error().into(),
|
||||
};
|
||||
|
||||
let frame_support = match generate_crate_access_2018("frame-support") {
|
||||
let frame_support = match generate_access_from_frame_or_crate("frame-support") {
|
||||
Ok(c) => c,
|
||||
Err(e) => return e.into_compile_error().into(),
|
||||
};
|
||||
@@ -111,7 +111,7 @@ pub fn derive_pallet_error(input: proc_macro::TokenStream) -> proc_macro::TokenS
|
||||
|
||||
fn generate_field_types(
|
||||
field: &syn::Field,
|
||||
scrate: &syn::Ident,
|
||||
scrate: &syn::Path,
|
||||
) -> syn::Result<Option<proc_macro2::TokenStream>> {
|
||||
let attrs = &field.attrs;
|
||||
|
||||
@@ -143,7 +143,7 @@ fn generate_field_types(
|
||||
|
||||
fn generate_variant_field_types(
|
||||
variant: &syn::Variant,
|
||||
scrate: &syn::Ident,
|
||||
scrate: &syn::Path,
|
||||
) -> syn::Result<Option<Vec<proc_macro2::TokenStream>>> {
|
||||
let attrs = &variant.attrs;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user