Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
giusdp committed Jan 17, 2024
1 parent dc3d779 commit e3d6aac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/builder/build_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ fn prepare_node_components<'a>(
component,
type_reg
.get_type_data::<ReflectComponent>((**component).type_id())
.expect(&format!(
.unwrap_or_else(|| {
panic!(
"Component {:?} not registered. Cannot build dialogue graph! :(",
component
))
)
})
.clone(),
)
})
Expand Down
4 changes: 2 additions & 2 deletions src/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ impl TalkBuilder {
/// use bevy_talks::prelude::TalkBuilder;
/// use bevy::prelude::*;
///
/// #[derive(Component, Reflect)]
/// #[derive(Component, Reflect, Default)]
/// #[reflect(Component)]
/// struct MyComp;
///
Expand All @@ -321,7 +321,7 @@ impl TalkBuilder {
/// If you add a `NodeEventEmitter` component the node will automatically emit the relative event when reached.
///
/// # Note
/// Remember to register the types! For `NodeEventEmitter` components you can use app.register_node_event::<MyComp, MyCompEvent>()
/// Remember to register the types! For `NodeEventEmitter` components you can use `app.register_node_event`
/// to setup everything at once. If it is a normal component, just use `app.world.register_type::<MyComp>()`.
///
/// # Panics
Expand Down

0 comments on commit e3d6aac

Please sign in to comment.