Skip to content

Commit f574226

Browse files
committed
refactor: make more private
1 parent c4962a9 commit f574226

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/android/mod.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub struct Context<'a, 'b> {
4444
pub webview: &'a JObject<'b>,
4545
}
4646

47-
pub(crate) struct StaticValue<T>(Mutex<T>);
47+
struct StaticValue<T>(Mutex<T>);
4848

4949
unsafe impl<T> Sync for StaticValue<T> {}
5050

@@ -58,12 +58,12 @@ impl<T> std::ops::Deref for StaticValue<T> {
5858

5959
macro_rules! define_static_handlers {
6060
($($var:ident = $type_name:ident { $($fields:ident:$types:ty),+ $(,)? });+ $(;)?) => {
61-
$(pub static $var: StaticValue<Option<$type_name>> = StaticValue(Mutex::new(None));
62-
pub struct $type_name {
61+
$(static $var: StaticValue<Option<$type_name>> = StaticValue(Mutex::new(None));
62+
struct $type_name {
6363
$($fields: $types,)*
6464
}
6565
impl $type_name {
66-
pub fn new($($fields: $types,)*) -> Self {
66+
fn new($($fields: $types,)*) -> Self {
6767
Self {
6868
$($fields,)*
6969
}
@@ -80,15 +80,15 @@ define_static_handlers! {
8080
ON_LOAD_HANDLER = UnsafeOnPageLoadHandler { handler: Box<dyn Fn(PageLoadEvent, String)> };
8181
}
8282

83-
pub static WITH_ASSET_LOADER: StaticValue<Option<bool>> = StaticValue(Mutex::new(None));
84-
pub static ASSET_LOADER_DOMAIN: StaticValue<Option<String>> = StaticValue(Mutex::new(None));
83+
static WITH_ASSET_LOADER: Mutex<Option<bool>> = Mutex::new(None);
84+
static ASSET_LOADER_DOMAIN: Mutex<Option<String>> = Mutex::new(None);
8585

86-
pub(crate) static PACKAGE: OnceCell<String> = OnceCell::new();
86+
static PACKAGE: OnceCell<String> = OnceCell::new();
8787

8888
type EvalCallback = Box<dyn Fn(String) + Send + 'static>;
8989

90-
pub static EVAL_ID_GENERATOR: Counter = Counter::new();
91-
pub static EVAL_CALLBACKS: OnceCell<Mutex<HashMap<i32, EvalCallback>>> = OnceCell::new();
90+
static EVAL_ID_GENERATOR: Counter = Counter::new();
91+
static EVAL_CALLBACKS: OnceCell<Mutex<HashMap<i32, EvalCallback>>> = OnceCell::new();
9292

9393
/// Sets up the necessary logic for wry to be able to create the webviews later.
9494
///

0 commit comments

Comments
 (0)