Public API and docs

This commit is contained in:
2023-05-26 15:23:15 +01:00
parent 3c1a6e2be2
commit fdf18e6ff8
99 changed files with 503 additions and 406 deletions

View File

@@ -1,8 +1,9 @@
/// A macro version of [Option::unwrap_or_else] which supports flow
/// control statements such as `return` and `break` in the "else" branch.
#[macro_export]
macro_rules! unwrap_or {
($m:expr; $fail:expr) => {{
if let Some(res) = ($m) { res } else { $fail }
}};
}
pub(crate) use unwrap_or;