diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 985a647..29ad32f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -130,6 +130,7 @@ jobs: ${{ runner.os }}-target-test-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }} ${{ runner.os }}-target-test-${{ matrix.rust }}- - run: cargo test --workspace --all-targets + - run: cargo test --workspace --doc # - run: cargo test --manifest-path imgui-gfx-examples/Cargo.toml --no-default-features --features directx # if: runner.os == 'Windows' - run: cargo test --manifest-path imgui-winit-support/Cargo.toml --no-default-features --features winit-19 diff --git a/imgui/src/popups.rs b/imgui/src/popups.rs index 5a7c1c3..401e2a5 100644 --- a/imgui/src/popups.rs +++ b/imgui/src/popups.rs @@ -20,15 +20,15 @@ create_token!( /// # use imgui::*; /// # let mut imgui = Context::create(); /// # let ui = imgui.frame(); -/// if ui.button(im_str!("Show modal"), [0.0, 0.0]) { +/// if ui.button(im_str!("Show modal")) { /// ui.open_popup(im_str!("modal")); /// } -/// if let Some(_token) = PopupModal::new(im_str!("modal")).begin_popup() { +/// if let Some(_token) = PopupModal::new(im_str!("modal")).begin_popup(&ui) { /// ui.text("Content of my modal"); -/// if ui.button(im_str!("OK"), [0.0, 0.0]) { +/// if ui.button(im_str!("OK")) { /// ui.close_current_popup(); /// } -/// }); +/// }; /// ``` #[must_use] pub struct PopupModal<'p> { diff --git a/imgui/src/stacks.rs b/imgui/src/stacks.rs index f9d4915..a2c755a 100644 --- a/imgui/src/stacks.rs +++ b/imgui/src/stacks.rs @@ -32,7 +32,7 @@ impl<'ui> Ui<'ui> { /// // During UI construction /// let font = ui.push_font(my_custom_font); /// ui.text("I use the custom font!"); - /// font.pop(&ui); + /// font.pop(); /// ``` #[doc(alias = "PushFont")] pub fn push_font(&self, id: FontId) -> FontStackToken<'_> { @@ -56,7 +56,7 @@ impl<'ui> Ui<'ui> { /// const RED: [f32; 4] = [1.0, 0.0, 0.0, 1.0]; /// let color = ui.push_style_color(StyleColor::Text, RED); /// ui.text("I'm red!"); - /// color.pop(&ui); + /// color.pop(); /// ``` #[doc(alias = "PushStyleColorVec4")] pub fn push_style_color(&self, style_color: StyleColor, color: [f32; 4]) -> ColorStackToken { @@ -112,7 +112,7 @@ impl<'ui> Ui<'ui> { /// # let ui = ctx.frame(); /// let style = ui.push_style_var(StyleVar::Alpha(0.2)); /// ui.text("I'm transparent!"); - /// style.pop(&ui); + /// style.pop(); /// ``` #[doc(alias = "PushStyleVar")] pub fn push_style_var(&self, style_var: StyleVar) -> StyleStackToken {