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

#8 in #mark-down

Download history 26/week @ 2024-07-28 97/week @ 2024-08-11 45/week @ 2024-08-18 4/week @ 2024-09-15 10/week @ 2024-09-22 8/week @ 2024-09-29

271 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

~410–540KB