Skip to content

Commit 0772835

Browse files
fix(xcq-types): replace hyphen to underscore for crate access (#36)
1 parent cc3b682 commit 0772835

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xcq-types/derive/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ fn import_xcq_types() -> TokenStream2 {
137137
match found_crate {
138138
FoundCrate::Itself => quote! { crate },
139139
FoundCrate::Name(name) => {
140-
let name = syn::Ident::new(&name, proc_macro2::Span::call_site());
141-
quote! { ::#name }
140+
let crate_ = syn::Ident::new(&name.replace('-', "_"), proc_macro2::Span::call_site());
141+
quote! { ::#crate_ }
142142
}
143143
}
144144
}

0 commit comments

Comments
 (0)