Skip to content

Commit

Permalink
replace hyphen
Browse files Browse the repository at this point in the history
  • Loading branch information
indirection42 committed Jul 12, 2024
1 parent cc3b682 commit ff80530
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xcq-types/derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ fn import_xcq_types() -> TokenStream2 {
match found_crate {
FoundCrate::Itself => quote! { crate },
FoundCrate::Name(name) => {
let name = syn::Ident::new(&name, proc_macro2::Span::call_site());
quote! { ::#name }
let crate_ = syn::Ident::new(&name.replace("-", "_"), proc_macro2::Span::call_site());
quote! { ::#crate_ }
}
}
}

0 comments on commit ff80530

Please sign in to comment.