You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
404 B
23 lines
404 B
use async_trait::async_trait;
|
|
use std::sync::Mutex;
|
|
|
|
async fn f() {}
|
|
|
|
#[async_trait]
|
|
trait Test {
|
|
async fn test(&self) {
|
|
let mutex = Mutex::new(());
|
|
let _guard = mutex.lock().unwrap();
|
|
f().await;
|
|
}
|
|
|
|
async fn test_ret(&self) -> bool {
|
|
let mutex = Mutex::new(());
|
|
let _guard = mutex.lock().unwrap();
|
|
f().await;
|
|
true
|
|
}
|
|
}
|
|
|
|
fn main() {}
|