Expand description
§Unwrap Todo
Provides Option::todo and Result::todo methods by providing an UnwrapTodo extension trait.
§Usage
ⓘ
// Make sure you import the trait. Otherwise, these functions will not be available.
use unwrap_todo::UnwrapTodo;
// handle this file not being here/valid later. I'm just prototyping!
let file_content = std::fs::read("greeting.txt").todo();
let as_string = String::from_utf8(file_content).todo();
assert_eq!(as_string, "hey!")Traits§
- Unwrap
Todo - Provide the
todomethod onOptionandResulttypes.