This commit is contained in:
Joonas Javanainen 2019-09-07 16:42:06 +03:00
parent 6a9fb254d6
commit 8149fb4268
No known key found for this signature in database
GPG Key ID: D39CCA5CB19B9179
2 changed files with 5 additions and 10 deletions

View File

@ -225,8 +225,8 @@ implement_vertex!(DrawVert, pos, uv, col);
#[cfg(feature = "gfx")]
mod gfx_support {
use gfx::*;
use super::DrawVert;
use gfx::*;
// gfx doesn't provide a macro to implement vertex structure for an existing struct, so we
// create a dummy vertex with the same memory layout using gfx macros, and delegate query(name)
@ -249,14 +249,8 @@ mod gfx_support {
#[test]
fn test_dummy_memory_layout() {
use std::mem;
assert_eq!(
mem::size_of::<DrawVert>(),
mem::size_of::<Dummy>()
);
assert_eq!(
mem::align_of::<DrawVert>(),
mem::align_of::<Dummy>()
);
assert_eq!(mem::size_of::<DrawVert>(), mem::size_of::<Dummy>());
assert_eq!(mem::align_of::<DrawVert>(), mem::align_of::<Dummy>());
use memoffset::offset_of;
macro_rules! assert_field_offset {
($l:ident, $r:ident) => {

View File

@ -62,7 +62,8 @@ pub struct WindowDrawList<'ui> {
_phantom: PhantomData<&'ui Ui<'ui>>,
}
static WINDOW_DRAW_LIST_LOADED: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false);
static WINDOW_DRAW_LIST_LOADED: std::sync::atomic::AtomicBool =
std::sync::atomic::AtomicBool::new(false);
impl<'ui> Drop for WindowDrawList<'ui> {
fn drop(&mut self) {