mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-11 05:28:35 +00:00
Add #[must_use] on builders
This commit is contained in:
parent
9b2d199d3d
commit
cca4c17417
@ -4,6 +4,7 @@ use std::ptr;
|
||||
|
||||
use super::{Ui, ImStr};
|
||||
|
||||
#[must_use]
|
||||
pub struct Menu<'ui, 'p> {
|
||||
label: ImStr<'p>,
|
||||
enabled: bool,
|
||||
@ -34,6 +35,7 @@ impl<'ui, 'p> Menu<'ui, 'p> {
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub struct MenuItem<'ui, 'p> {
|
||||
label: ImStr<'p>,
|
||||
shortcut: Option<ImStr<'p>>,
|
||||
|
||||
@ -5,6 +5,7 @@ use super::{Ui, ImStr};
|
||||
|
||||
// TODO: Consider using Range, even though it is half-open
|
||||
|
||||
#[must_use]
|
||||
pub struct SliderInt<'ui, 'p> {
|
||||
label: ImStr<'p>,
|
||||
value: &'p mut i32,
|
||||
@ -41,6 +42,7 @@ impl<'ui, 'p> SliderInt<'ui, 'p> {
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub struct SliderFloat<'ui, 'p> {
|
||||
label: ImStr<'p>,
|
||||
value: &'p mut f32,
|
||||
|
||||
@ -3,6 +3,7 @@ use std::marker::PhantomData;
|
||||
|
||||
use super::{Ui, ImGuiSetCond, ImStr};
|
||||
|
||||
#[must_use]
|
||||
pub struct TreeNode<'ui, 'p> {
|
||||
id: ImStr<'p>,
|
||||
label: Option<ImStr<'p>>,
|
||||
|
||||
@ -4,6 +4,7 @@ use std::ptr;
|
||||
|
||||
use super::{Ui, ImStr};
|
||||
|
||||
#[must_use]
|
||||
pub struct CollapsingHeader<'ui, 'p> {
|
||||
label: ImStr<'p>,
|
||||
str_id: Option<ImStr<'p>>,
|
||||
|
||||
@ -13,6 +13,7 @@ use super::{
|
||||
ImStr, ImVec2
|
||||
};
|
||||
|
||||
#[must_use]
|
||||
pub struct Window<'ui, 'p> {
|
||||
pos: (f32, f32),
|
||||
pos_cond: ImGuiSetCond,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user