mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-11 05:28:35 +00:00
clippy stop yelling at me
This commit is contained in:
parent
69fb34f0f8
commit
32cf2b9e6c
@ -137,10 +137,10 @@ impl System {
|
||||
gl_window.window().request_redraw();
|
||||
}
|
||||
Event::RedrawRequested(_) => {
|
||||
let mut ui = imgui.frame();
|
||||
let ui = imgui.frame();
|
||||
|
||||
let mut run = true;
|
||||
run_ui(&mut run, &mut ui);
|
||||
run_ui(&mut run, ui);
|
||||
if !run {
|
||||
*control_flow = ControlFlow::Exit;
|
||||
}
|
||||
|
||||
@ -65,6 +65,11 @@ pub trait RawWrapper {
|
||||
}
|
||||
|
||||
/// Casting from/to a raw type that has the same layout and alignment as the target type
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// Each function outlines its own safety contract, which generally is
|
||||
/// that the cast from `T` to `Self` is valid.
|
||||
pub unsafe trait RawCast<T>: Sized {
|
||||
/// Casts an immutable reference from the raw type
|
||||
///
|
||||
@ -124,6 +129,9 @@ pub enum DataType {
|
||||
///
|
||||
/// If this trait is implemented for a type, it is assumed to have *exactly* the same
|
||||
/// representation in memory as the primitive value described by the associated `KIND` constant.
|
||||
///
|
||||
/// # Safety
|
||||
/// The `DataType` *must* have the same representation as the primitive value of `KIND`.
|
||||
pub unsafe trait DataTypeKind: Copy {
|
||||
const KIND: DataType;
|
||||
}
|
||||
|
||||
@ -840,7 +840,7 @@ pub struct Specs<'a>(&'a [sys::ImGuiTableColumnSortSpecs]);
|
||||
|
||||
impl<'a> Specs<'a> {
|
||||
pub fn iter(self) -> impl Iterator<Item = TableColumnSortSpecs<'a>> {
|
||||
self.0.iter().map(|v| TableColumnSortSpecs(v))
|
||||
self.0.iter().map(TableColumnSortSpecs)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user