From 433be96aaf9ac5b7b6c82a07c7ea6a91ee64f0ba Mon Sep 17 00:00:00 2001 From: JieningYu Date: Sat, 24 Aug 2024 23:05:08 +0800 Subject: [PATCH] add panic doc for `TypeBuilder::build` --- crates/core/component/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/core/component/src/lib.rs b/crates/core/component/src/lib.rs index d55d22a..684d00d 100644 --- a/crates/core/component/src/lib.rs +++ b/crates/core/component/src/lib.rs @@ -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 {