5 releases

0.1.8 Aug 17, 2024
0.1.6 Jul 25, 2024
0.1.5 Jul 25, 2024
0.1.4 Jul 25, 2024
0.1.3 Jul 25, 2024

#33 in #mark-down

Download history 275/week @ 2024-07-23 9/week @ 2024-07-30 136/week @ 2024-08-13 6/week @ 2024-08-20

142 downloads per month

MulanPSL-2.0

8KB
68 lines

tryn

use std::sync::atomic::{AtomicU8, Ordering};

use aok::{Result, OK};
use static_init::constructor;

#[constructor(0)]
extern "C" fn init() {
  loginit::init()
}

#[tokio::test]
async fn test() -> Result<()> {
  let n = AtomicU8::new(0);
  tryn::retry(|| async {
    let t = n.fetch_add(1, Ordering::SeqCst);
    if t == 0 {
      aok::throw!("test error");
    }
    Ok(())
  })
  .await?;

  OK
}

About

This project is an open-source component of i18n.site ⋅ Internationalization Solution.

关于

本项目为 i18n.site ⋅ 国际化解决方案 的开源组件。

Dependencies

~545KB