mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 14:47:13 -04:00
16 lines
342 B
Rust
16 lines
342 B
Rust
#[rustfmt::skip]
|
|
use flowy_dispatch::prelude::*;
|
|
use std::sync::Once;
|
|
|
|
#[allow(dead_code)]
|
|
pub fn setup_env() {
|
|
static INIT: Once = Once::new();
|
|
INIT.call_once(|| env_logger::init());
|
|
}
|
|
|
|
pub fn init_dispatch<F>(module_factory: F) -> EventDispatch
|
|
where
|
|
F: FnOnce() -> Vec<Module>,
|
|
{
|
|
EventDispatch::construct(module_factory)
|
|
}
|