diff --git a/imgui/src/lib.rs b/imgui/src/lib.rs index 980bf99..4de20f7 100644 --- a/imgui/src/lib.rs +++ b/imgui/src/lib.rs @@ -426,8 +426,8 @@ impl Ui { /// // or you could call /// // if you want to let it drop on its own, name it `_wt`. /// // never name it `_`, as this will drop it *immediately*. - /// wt.unwrap().end(); - /// } + /// wt.end(); + /// }; /// ``` pub fn window>(&self, name: Label) -> Window<'_, '_, Label> { Window::new(self, name) diff --git a/imgui/src/stacks.rs b/imgui/src/stacks.rs index 69c9eb7..d6ef1b0 100644 --- a/imgui/src/stacks.rs +++ b/imgui/src/stacks.rs @@ -418,7 +418,7 @@ impl<'ui> Ui { /// for num in 0..10 { /// // And now we add the loop number to the stack too, /// // to make our buttons unique within this window. - /// let _id = ui.push_id(num); + /// let _id = ui.push_id_usize(num); /// if ui.button("Click!") { /// println!("Button {} clicked", num); /// }