Skip to content

Commit

Permalink
add panic doc for TypeBuilder::build
Browse files Browse the repository at this point in the history
  • Loading branch information
JieningYu committed Aug 24, 2024
1 parent b9a640f commit 433be96
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/core/component/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ where
T: Clone + Eq + Hash + Send + Sync + 'a,
{
/// Builds a new [`ComponentType`] with the given codecs.
///
/// # Panics
///
/// Panics if the packet codec is not set.
pub const fn build(self) -> ComponentType<'a, T> {
ComponentType {
f: Funcs {
Expand Down

0 comments on commit 433be96

Please sign in to comment.