Skip to content

Commit 5ff72eb

Browse files
committed
Tweak make_tag_for_widget doc
1 parent 41d3c68 commit 5ff72eb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

masonry_core/src/app/render_root.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,8 @@ impl RenderRoot {
648648
}
649649

650650
/// Creates a unique tag for the widget with the given id and returns it.
651+
///
652+
/// This will return a unique tag even if called multiple times with the same id.
651653
pub fn make_tag_for_widget<W: Widget>(&mut self, id: WidgetId) -> WidgetTag<W> {
652654
let Some(node_ref) = self.widget_arena.nodes.find(id) else {
653655
panic!("Could not find widget {id} in tree.");
@@ -668,6 +670,8 @@ impl RenderRoot {
668670
}
669671

670672
/// Creates a unique type-erased tag for the widget with the given id and returns it.
673+
///
674+
/// This will return a unique tag even if called multiple times with the same id.
671675
pub fn make_dyn_tag_for_widget(&mut self, id: WidgetId) -> WidgetTag<dyn Widget> {
672676
let Some(_) = self.widget_arena.nodes.find(id) else {
673677
panic!("Could not find widget {id} in tree.");

0 commit comments

Comments
 (0)