diff --git a/src/foundation/class.rs b/src/foundation/class.rs index 7a6a719..9d2b334 100644 --- a/src/foundation/class.rs +++ b/src/foundation/class.rs @@ -57,7 +57,7 @@ impl ClassMap { pub fn new() -> Self { ClassMap(RwLock::new(HashMap::new())) } - + /// A publicly accessible load method that just passes through our global singleton. pub fn static_load(class_name: &'static str, superclass_name: Option<&'static str>) -> Option<*const Class> { CLASSES.load(class_name, superclass_name) @@ -129,11 +129,7 @@ impl ClassMap { /// > class name - but most cases do not need this and it would be a larger change to orchestrate at /// > the moment. #[inline(always)] -pub fn load_or_register_class( - superclass_name: &'static str, - subclass_name: &'static str, - config: F -) -> *const Class +pub fn load_or_register_class(superclass_name: &'static str, subclass_name: &'static str, config: F) -> *const Class where F: Fn(&mut ClassDecl) + 'static { diff --git a/src/foundation/mod.rs b/src/foundation/mod.rs index aa1a61e..e101255 100644 --- a/src/foundation/mod.rs +++ b/src/foundation/mod.rs @@ -28,8 +28,8 @@ mod array; pub use array::NSArray; mod class; -pub use class::{load_or_register_class, load_or_register_class_with_optional_generated_suffix}; pub(crate) use class::ClassMap; +pub use class::{load_or_register_class, load_or_register_class_with_optional_generated_suffix}; mod data; pub use data::NSData; diff --git a/src/uikit/app/class.rs b/src/uikit/app/class.rs index 365df04..c4f1328 100644 --- a/src/uikit/app/class.rs +++ b/src/uikit/app/class.rs @@ -10,10 +10,5 @@ use crate::foundation::load_or_register_class_with_optional_generated_suffix; pub(crate) fn register_app_class() -> *const Class { let should_generate_suffix = false; - load_or_register_class_with_optional_generated_suffix( - "UIApplication", - "RSTApplication", - should_generate_suffix, - |decl| {} - ) + load_or_register_class_with_optional_generated_suffix("UIApplication", "RSTApplication", should_generate_suffix, |decl| {}) } diff --git a/src/uikit/app/mod.rs b/src/uikit/app/mod.rs index 1ab6a2e..e4b03bd 100644 --- a/src/uikit/app/mod.rs +++ b/src/uikit/app/mod.rs @@ -161,7 +161,6 @@ impl App { } } - impl Drop for App { fn drop(&mut self) { println!("DROPPING"); diff --git a/src/uikit/scene/config.rs b/src/uikit/scene/config.rs index c0fec7b..c637004 100644 --- a/src/uikit/scene/config.rs +++ b/src/uikit/scene/config.rs @@ -2,7 +2,7 @@ use objc::runtime::Object; use objc::{class, msg_send, sel, sel_impl}; use objc_id::Id; -use crate::foundation::{id, NSString, ClassMap}; +use crate::foundation::{id, ClassMap, NSString}; use crate::uikit::scene::SessionRole; /// A wrapper for UISceneConfiguration.