From cfb9a671eccb5da4878370d686dfb72c67a948d3 Mon Sep 17 00:00:00 2001 From: Jack Mac Date: Fri, 1 Oct 2021 16:31:01 -0400 Subject: [PATCH] fixed up tests --- imgui/src/lib.rs | 4 ++-- imgui/src/stacks.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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); /// }