feat: run rustfmt with custom defined fmt configuration (#1848)

* chore: update rustfmt

* chore: apply rustfmt format
This commit is contained in:
Nathan.fooo
2023-02-13 09:29:49 +08:00
committed by GitHub
parent e2496e734c
commit 6bb1c4e89c
459 changed files with 50554 additions and 46600 deletions

View File

@ -3,23 +3,23 @@ use lib_dispatch::runtime::tokio_default_runtime;
use std::sync::Arc;
pub async fn hello() -> String {
"say hello".to_string()
"say hello".to_string()
}
#[tokio::test]
async fn test() {
let event = "1";
let runtime = tokio_default_runtime().unwrap();
let dispatch = Arc::new(AFPluginDispatcher::construct(runtime, || {
vec![AFPlugin::new().event(event, hello)]
}));
let request = AFPluginRequest::new(event);
let _ = AFPluginDispatcher::async_send_with_callback(dispatch.clone(), request, |resp| {
Box::pin(async move {
dbg!(&resp);
})
let event = "1";
let runtime = tokio_default_runtime().unwrap();
let dispatch = Arc::new(AFPluginDispatcher::construct(runtime, || {
vec![AFPlugin::new().event(event, hello)]
}));
let request = AFPluginRequest::new(event);
let _ = AFPluginDispatcher::async_send_with_callback(dispatch.clone(), request, |resp| {
Box::pin(async move {
dbg!(&resp);
})
.await;
})
.await;
std::mem::forget(dispatch);
std::mem::forget(dispatch);
}