Skip to content

Commit

Permalink
fix: formatting in src/platform directories
Browse files Browse the repository at this point in the history
  • Loading branch information
hamirmahal committed Oct 10, 2024
1 parent 3dd5cad commit 5376da0
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 29 deletions.
2 changes: 1 addition & 1 deletion src/platform/android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ pub mod prelude {
pub use crate::platform_impl::ndk_glue::*;
pub use tao_macros::{android_fn, generate_package_name};
}
use crate::platform_impl::ndk_glue::Rect;
use crate::{
event_loop::{EventLoop, EventLoopWindowTarget},
platform_impl::ndk_glue::Rect,
window::{Window, WindowBuilder},
};
use ndk::configuration::Configuration;
Expand Down
2 changes: 1 addition & 1 deletion src/platform_impl/android/ndk_glue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ macro_rules! android_binding {
::tao::android_binding!($domain, $package, $activity, $setup, $main, ::tao)
};
($domain:ident, $package:ident, $activity:ident, $setup:path, $main:ident, $tao:path) => {{
use $tao::{platform::android::prelude::android_fn, platform::android::prelude::*};
use $tao::platform::android::prelude::{android_fn, *};
fn _____tao_store_package_name__() {
PACKAGE.get_or_init(move || generate_package_name!($domain, $package));
}
Expand Down
13 changes: 6 additions & 7 deletions src/platform_impl/linux/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ use crate::{
error::ExternalError,
window::WindowSizeConstraints,
};
use gtk::gdk::{
self,
prelude::{DeviceExt, SeatExt},
Display,
};
use gtk::{
gdk::{
self,
prelude::{DeviceExt, SeatExt},
Display,
},
glib::{self},
traits::{GtkWindowExt, WidgetExt},
};
use std::cell::RefCell;
use std::rc::Rc;
use std::{cell::RefCell, rc::Rc};

#[inline]
pub fn cursor_position(is_wayland: bool) -> Result<PhysicalPosition<f64>, ExternalError> {
Expand Down
3 changes: 2 additions & 1 deletion src/platform_impl/linux/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ use std::{
use gtk::{
gdk::WindowState,
glib::{self, translate::ToGlibPtr},
prelude::*,
Settings,
};
use gtk::{prelude::*, Settings};

use crate::{
dpi::{LogicalPosition, LogicalSize, PhysicalPosition, PhysicalSize, Position, Size},
Expand Down
18 changes: 10 additions & 8 deletions src/platform_impl/macos/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@ use crate::{
event::Event,
event_loop::{ControlFlow, EventLoopClosed, EventLoopWindowTarget as RootWindowTarget},
monitor::MonitorHandle as RootMonitorHandle,
platform_impl::platform::{
app::APP_CLASS,
app_delegate::APP_DELEGATE_CLASS,
app_state::AppState,
monitor::{self, MonitorHandle},
observer::*,
util::{self, IdRef},
platform_impl::{
platform::{
app::APP_CLASS,
app_delegate::APP_DELEGATE_CLASS,
app_state::AppState,
monitor::{self, MonitorHandle},
observer::*,
util::{self, IdRef},
},
set_progress_indicator,
},
platform_impl::set_progress_indicator,
window::{ProgressBarState, Theme},
};

Expand Down
6 changes: 4 additions & 2 deletions src/platform_impl/macos/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ use cocoa::{
foundation::{NSAutoreleasePool, NSPoint, NSRect, NSString, NSUInteger},
};
use core_graphics::display::CGDisplay;
use objc::class;
use objc::runtime::{Class, Object, Sel, BOOL, YES};
use objc::{
class,
runtime::{Class, Object, Sel, BOOL, YES},
};

use crate::{
dpi::{LogicalPosition, PhysicalPosition},
Expand Down
20 changes: 11 additions & 9 deletions src/platform_impl/macos/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,18 @@ use crate::{
icon::Icon,
monitor::{MonitorHandle as RootMonitorHandle, VideoMode as RootVideoMode},
platform::macos::WindowExtMacOS,
platform_impl::platform::{
app_state::AppState,
ffi,
monitor::{self, MonitorHandle, VideoMode},
util::{self, IdRef},
view::{self, new_view, CursorState},
window_delegate::new_delegate,
OsError,
platform_impl::{
platform::{
app_state::AppState,
ffi,
monitor::{self, MonitorHandle, VideoMode},
util::{self, IdRef},
view::{self, new_view, CursorState},
window_delegate::new_delegate,
OsError,
},
set_progress_indicator,
},
platform_impl::set_progress_indicator,
window::{
CursorIcon, Fullscreen, ProgressBarState, ResizeDirection, Theme, UserAttentionType,
WindowAttributes, WindowId as RootWindowId, WindowSizeConstraints,
Expand Down

0 comments on commit 5376da0

Please sign in to comment.