diff --git a/README.org b/README.org index 74b7755..e75fcfc 100644 --- a/README.org +++ b/README.org @@ -100,22 +100,24 @@ On =nightly= Rust versions, values of type ~GHOST_TSuccess~ can be propagated directly with ~?~, but on stable they must be propagated through ~GhostResult~: #+BEGIN_SRC rust - extern "C" {fn returns_tsuccess() -> GHOST_TSuccess;} - - fn try_things_internal() -> GhostResult // On nightly, we can propagage `GHOST_TSuccess` directly here, but it's still more desireable for us to have a `Result` instead of an integer in Rust, so this is still preferrable. - { - returns_tsuccess()?; - - Ok(()) - } - - fn caller() - { - match try_things_internal() { - Ok(_) => println!("Yay!"), - Err(_) => panic!("Fug"), - } - } + extern "C" {fn returns_tsuccess() -> GHOST_TSuccess;} + + fn try_things_internal() -> GhostResult // On nightly, we can propagage `GHOST_TSuccess` directly here, but it's still more desireable for us to have a `Result` instead of an integer in Rust, so this is still preferrable. + { + unsafe { + eturns_tsuccess()?; + } + + Ok(()) + } + + fn caller() + { + match try_things_internal() { + Ok(_) => println!("Yay!"), + Err(_) => panic!("Fug"), + } + } #+END_SRC Keeping such a style is /usually/ preferred, anyhow.