1
0
Fork 0

Cargo fmt

This commit is contained in:
Mirko Covizzi 2020-06-08 23:04:18 +02:00
parent 9324b1b129
commit 561d1a3005

View file

@ -13,7 +13,13 @@ use self::winapi::um::wingdi::{
PFD_DOUBLEBUFFER, PFD_DRAW_TO_WINDOW, PFD_MAIN_PLANE, PFD_SUPPORT_OPENGL, PFD_TYPE_RGBA,
PIXELFORMATDESCRIPTOR,
};
use self::winapi::um::winuser::{CreateWindowExA, DefWindowProcA, DispatchMessageA, GetDC, PeekMessageA, PostQuitMessage, RegisterClassA, TranslateMessage, CS_HREDRAW, CS_OWNDC, CS_VREDRAW, CW_USEDEFAULT, MSG, PM_REMOVE, WM_DESTROY, WM_QUIT, WNDCLASSA, WS_CAPTION, WS_CHILD, WS_CLIPSIBLINGS, WS_MAXIMIZEBOX, WS_MINIMIZEBOX, WS_POPUPWINDOW, WS_SIZEBOX, WS_VISIBLE, MessageBoxA, MB_ICONERROR, MB_TOPMOST, MB_OK};
use self::winapi::um::winuser::{
CreateWindowExA, DefWindowProcA, DispatchMessageA, GetDC, MessageBoxA, PeekMessageA,
PostQuitMessage, RegisterClassA, TranslateMessage, CS_HREDRAW, CS_OWNDC, CS_VREDRAW,
CW_USEDEFAULT, MB_ICONERROR, MB_OK, MB_TOPMOST, MSG, PM_REMOVE, WM_DESTROY, WM_QUIT, WNDCLASSA,
WS_CAPTION, WS_CHILD, WS_CLIPSIBLINGS, WS_MAXIMIZEBOX, WS_MINIMIZEBOX, WS_POPUPWINDOW,
WS_SIZEBOX, WS_VISIBLE,
};
use crate::Parent::WithParent;
use crate::WindowOpenOptions;
@ -21,12 +27,7 @@ use crate::WindowOpenOptions;
unsafe fn message_box(title: &str, msg: &str) {
let title = (title.to_owned() + "\0").as_ptr() as *const i8;
let msg = (msg.to_owned() + "\0").as_ptr() as *const i8;
MessageBoxA(
null_mut(),
msg,
title,
MB_ICONERROR | MB_OK | MB_TOPMOST
);
MessageBoxA(null_mut(), msg, title, MB_ICONERROR | MB_OK | MB_TOPMOST);
}
unsafe fn generate_guid() -> String {