mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-12 05:58:35 +00:00
with_window_draw_list: Fix example test
The test was failing because no `main` function was defined, as explained in the rustdoc documentation [1]. Add the "no_run" flag. This way, there is no attempt to run the test code. Only compile checks are done. Thus defining a `main` function is unnecessary. Moreover "export crate imgui" is implicit, so removed. [1] https://doc.rust-lang.org/stable/rustdoc/documentation-tests.html#pre-processing-examples.
This commit is contained in:
parent
664660a090
commit
eab85ea871
@ -1270,8 +1270,7 @@ impl<'ui> Ui<'ui> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # extern crate imgui;
|
||||
/// ```rust,no_run
|
||||
/// # use imgui::*;
|
||||
/// fn custom_draw(ui: &Ui) {
|
||||
/// ui.with_window_draw_list(|draw_list| {
|
||||
|
||||
@ -78,8 +78,7 @@ impl<'ui> WindowDrawList<'ui> {
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// # extern crate imgui;
|
||||
/// ```rust,no_run
|
||||
/// # use imgui::*;
|
||||
/// fn custom_drawing(ui: &Ui) {
|
||||
/// ui.with_window_draw_list(|draw_list| {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user