Skip to content

Commit

Permalink
Add some debug assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Aug 27, 2024
1 parent 34e87ce commit 1101aa8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/cw-schema/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ impl Identifier {
type_id_of::<T> as usize
}

debug_assert_eq!(type_id_of::<T>(), type_id_of::<T>());
debug_assert_eq!(core::any::type_name::<T>(), core::any::type_name::<T>());

Self(type_id_of::<T>())
}
}
Expand Down

0 comments on commit 1101aa8

Please sign in to comment.