mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-08-14 09:26:07 -04:00
cargo fmt
This commit is contained in:
parent
c812534eb6
commit
01a4b9c735
34 changed files with 974 additions and 827 deletions
|
@ -283,7 +283,7 @@ pub extern "C" fn initialize_veilid_core(platform_config: FfiStr) {
|
|||
.with_endpoint(format!("http://{}", grpc_endpoint));
|
||||
let batch = opentelemetry::runtime::Tokio;
|
||||
} else {
|
||||
compile_error!("needs executor implementation")
|
||||
compile_error!("needs executor implementation");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,19 +16,19 @@ cfg_if! {
|
|||
pub use async_std::future::timeout;
|
||||
} else if #[cfg(feature="rt-tokio")] {
|
||||
pub use tokio::task::JoinHandle;
|
||||
|
||||
|
||||
//pub use tokio::time::error::Elapsed as TimeoutError;
|
||||
|
||||
|
||||
pub fn spawn<F: Future<Output = T> + Send + 'static, T: Send + 'static>(f: F) -> JoinHandle<T> {
|
||||
GLOBAL_RUNTIME.spawn(f)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
static ref GLOBAL_RUNTIME: tokio::runtime::Runtime = tokio::runtime::Runtime::new().unwrap();
|
||||
}
|
||||
} else {
|
||||
compile_error!("needs executor implementation")
|
||||
compile_error!("needs executor implementation");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue