Compare commits

..

3 Commits

Author SHA1 Message Date
Avril 51bc5113b5
Bump version 1.2.1: change core::intrinsics::r#try -> catch_unwind (https://github.com/notflan/stackalloc-rs/pull/2)
7 months ago
Avril 54009f74e8
Merge pull request #2 from elrafoon/catch_unwind
7 months ago
Stanislav Ravas a702bc88ff fix: change core::intrinsics::r#try -> catch_unwind
7 months ago

@ -1,6 +1,6 @@
[package]
name = "stackalloc"
version = "1.2.0"
version = "1.2.1"
homepage = "https://git.flanchan.moe/flanchan/stackalloc-rs"
repository = "https://github.com/notflan/stackalloc-rs"
keywords = ["alloca", "stack", "stack-allocation", "safe"]

@ -252,7 +252,7 @@ unsafe fn catch_unwind<R, F: FnOnce() -> R>(f: F) -> Result<R, ()>{
let data_ptr = &mut data as *mut _ as *mut u8;
if core::intrinsics::r#try(do_call::<F, R>, data_ptr, do_catch::<F, R>) == 0{
if core::intrinsics::catch_unwind(do_call::<F, R>, data_ptr, do_catch::<F, R>) == 0{
Result::Ok(ManuallyDrop::into_inner(data.r))
}else{
Result::Err(())

Loading…
Cancel
Save