Created
March 6, 2025 17:54
-
-
Save qatoqat/261b30653cc3b06a5e30c3045c519a21 to your computer and use it in GitHub Desktop.
ok shortcut
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pub trait IntoOk<T> { | |
| fn ok(self) -> anyhow::Result<T>; | |
| } | |
| impl<T> IntoOk<T> for T { | |
| fn ok(self) -> anyhow::Result<T> { | |
| Ok(self) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment