1
0
Fork 0

clean up some warnings and cargo fmt

This commit is contained in:
Micah Johnston 2020-09-05 21:19:37 -05:00
parent 9d39ba9117
commit 10d3870644
2 changed files with 8 additions and 11 deletions

View file

@ -1,5 +1,4 @@
mod event; mod event;
mod window; mod window;
pub use event::*;
pub use window::*; pub use window::*;

View file

@ -8,18 +8,16 @@ use self::winapi::shared::minwindef::{ATOM, FALSE, LPARAM, LRESULT, UINT, WPARAM
use self::winapi::shared::windef::{HWND, RECT}; use self::winapi::shared::windef::{HWND, RECT};
use self::winapi::um::combaseapi::CoCreateGuid; use self::winapi::um::combaseapi::CoCreateGuid;
use self::winapi::um::winuser::{ use self::winapi::um::winuser::{
AdjustWindowRectEx, CreateWindowExA, DefWindowProcA, DestroyWindow, DispatchMessageA, GetDC, AdjustWindowRectEx, CreateWindowExA, DefWindowProcA, DestroyWindow, GetMessageA,
GetMessageA, GetWindowLongPtrA, MessageBoxA, PeekMessageA, PostMessageA, RegisterClassA, GetWindowLongPtrA, MessageBoxA, PostMessageA, RegisterClassA, SetTimer, SetWindowLongPtrA,
ReleaseDC, SetTimer, SetWindowLongPtrA, TranslateMessage, UnregisterClassA, CS_OWNDC, TranslateMessage, UnregisterClassA, CS_OWNDC, GWLP_USERDATA, MB_ICONERROR, MB_OK, MB_TOPMOST,
GWLP_USERDATA, MB_ICONERROR, MB_OK, MB_TOPMOST, MSG, PM_REMOVE, WM_CREATE, WM_QUIT, MSG, WM_CREATE, WM_SHOWWINDOW, WNDCLASSA, WS_CAPTION, WS_CHILD, WS_CLIPSIBLINGS,
WM_SHOWWINDOW, WM_TIMER, WNDCLASSA, WS_CAPTION, WS_CHILD, WS_CLIPSIBLINGS, WS_MAXIMIZEBOX, WS_MAXIMIZEBOX, WS_MINIMIZEBOX, WS_POPUPWINDOW, WS_SIZEBOX, WS_VISIBLE,
WS_MINIMIZEBOX, WS_POPUPWINDOW, WS_SIZEBOX, WS_VISIBLE,
}; };
use self::winapi::ctypes::c_void; use self::winapi::ctypes::c_void;
use crate::Parent::WithParent; use super::event::handle_message;
use crate::{handle_message, WindowOpenOptions}; use crate::{AppWindow, Event, Parent::WithParent, RawWindow, WindowInfo, WindowOpenOptions};
use crate::{AppWindow, Event, RawWindow, WindowInfo};
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
unsafe fn message_box(title: &str, msg: &str) { unsafe fn message_box(title: &str, msg: &str) {
@ -175,7 +173,7 @@ impl<A: AppWindow> Window<A> {
let app_window = A::build(raw_window, &window_info); let app_window = A::build(raw_window, &window_info);
let mut window = Window { let window = Window {
hwnd, hwnd,
window_class, window_class,
app_window, app_window,