Skip to content

Commit

Permalink
Swap BinaryHeap for Vec to avoid Ord constraint issue (#1523)
Browse files Browse the repository at this point in the history
* Swap BianryHeap for KeyedVec to avoid Ord constraint issue

* Vec, not KeyedVec
  • Loading branch information
jsdw authored Apr 10, 2024
1 parent c07ee0c commit 51d9ce0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ fn default_derives(crate_path: &syn::Path) -> DerivesRegistry {
fn default_substitutes(crate_path: &syn::Path) -> TypeSubstitutes {
let mut type_substitutes = TypeSubstitutes::new();

let defaults: [(syn::Path, syn::Path); 11] = [
let defaults: [(syn::Path, syn::Path); 12] = [
(
parse_quote!(bitvec::order::Lsb0),
parse_quote!(#crate_path::utils::bits::Lsb0),
Expand Down Expand Up @@ -389,6 +389,10 @@ fn default_substitutes(crate_path: &syn::Path) -> TypeSubstitutes {
parse_quote!(BTreeMap),
parse_quote!(#crate_path::utils::KeyedVec),
),
(
parse_quote!(BinaryHeap),
parse_quote!(#crate_path::alloc::vec::Vec),
),
(
parse_quote!(BTreeSet),
parse_quote!(#crate_path::alloc::vec::Vec),
Expand Down

0 comments on commit 51d9ce0

Please sign in to comment.