Registry / utility / try-opt

try-opt

JSON →
library0.2.0rscratesunverified

Deprecated macro providing try!-like functionality for Option types.

# Cargo.toml [dependencies] try_opt = "0.2.0"
INSTALL
IMPORT
SIG · TRY-OPT
T
try-opt
utilityrustv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

try_opt
use try_opt::try_opt;

Shows the deprecated try_opt macro usage.

use try_opt::try_opt; fn example() -> Option<i32> { let a = Some(1); let b = try_opt!(a); Some(b + 1) }
Debug
Known issues
breakingCrate is deprecated; use the `?` operator with Option instead.
fix
Replace `try_opt!(expr)` with `expr?`.
affects: >=0.1.0
Upgrade
Version history
0.2.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
try-opt — cargo add try-opt · libregistry