[ios] Fix formatting
This commit is contained in:
parent
3e3122f54c
commit
efea9032aa
|
@ -57,7 +57,7 @@ impl ClassMap {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
ClassMap(RwLock::new(HashMap::new()))
|
ClassMap(RwLock::new(HashMap::new()))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A publicly accessible load method that just passes through our global singleton.
|
/// 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> {
|
pub fn static_load(class_name: &'static str, superclass_name: Option<&'static str>) -> Option<*const Class> {
|
||||||
CLASSES.load(class_name, superclass_name)
|
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
|
/// > class name - but most cases do not need this and it would be a larger change to orchestrate at
|
||||||
/// > the moment.
|
/// > the moment.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn load_or_register_class<F>(
|
pub fn load_or_register_class<F>(superclass_name: &'static str, subclass_name: &'static str, config: F) -> *const Class
|
||||||
superclass_name: &'static str,
|
|
||||||
subclass_name: &'static str,
|
|
||||||
config: F
|
|
||||||
) -> *const Class
|
|
||||||
where
|
where
|
||||||
F: Fn(&mut ClassDecl) + 'static
|
F: Fn(&mut ClassDecl) + 'static
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,8 +28,8 @@ mod array;
|
||||||
pub use array::NSArray;
|
pub use array::NSArray;
|
||||||
|
|
||||||
mod class;
|
mod class;
|
||||||
pub use class::{load_or_register_class, load_or_register_class_with_optional_generated_suffix};
|
|
||||||
pub(crate) use class::ClassMap;
|
pub(crate) use class::ClassMap;
|
||||||
|
pub use class::{load_or_register_class, load_or_register_class_with_optional_generated_suffix};
|
||||||
|
|
||||||
mod data;
|
mod data;
|
||||||
pub use data::NSData;
|
pub use data::NSData;
|
||||||
|
|
|
@ -10,10 +10,5 @@ use crate::foundation::load_or_register_class_with_optional_generated_suffix;
|
||||||
pub(crate) fn register_app_class() -> *const Class {
|
pub(crate) fn register_app_class() -> *const Class {
|
||||||
let should_generate_suffix = false;
|
let should_generate_suffix = false;
|
||||||
|
|
||||||
load_or_register_class_with_optional_generated_suffix(
|
load_or_register_class_with_optional_generated_suffix("UIApplication", "RSTApplication", should_generate_suffix, |decl| {})
|
||||||
"UIApplication",
|
|
||||||
"RSTApplication",
|
|
||||||
should_generate_suffix,
|
|
||||||
|decl| {}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,7 +161,6 @@ impl<T, W, F> App<T, W, F> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
impl<T, W, F> Drop for App<T, W, F> {
|
impl<T, W, F> Drop for App<T, W, F> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
println!("DROPPING");
|
println!("DROPPING");
|
||||||
|
|
|
@ -2,7 +2,7 @@ use objc::runtime::Object;
|
||||||
use objc::{class, msg_send, sel, sel_impl};
|
use objc::{class, msg_send, sel, sel_impl};
|
||||||
use objc_id::Id;
|
use objc_id::Id;
|
||||||
|
|
||||||
use crate::foundation::{id, NSString, ClassMap};
|
use crate::foundation::{id, ClassMap, NSString};
|
||||||
use crate::uikit::scene::SessionRole;
|
use crate::uikit::scene::SessionRole;
|
||||||
|
|
||||||
/// A wrapper for UISceneConfiguration.
|
/// A wrapper for UISceneConfiguration.
|
||||||
|
|
Loading…
Reference in a new issue