| Crates.io | mock_todo |
| lib.rs | mock_todo |
| version | 0.1.0 |
| created_at | 2025-06-15 15:30:05.876762+00 |
| updated_at | 2025-06-15 15:30:05.876762+00 |
| description | A macro that makes it easy to mock todo with values to make the code compilable. |
| homepage | https://github.com/regpab/mock_todo |
| repository | https://github.com/regpab/mock_todo |
| max_upload_size | |
| id | 1713400 |
| size | 15,751 |
A macro that makes it easy to mock todo with values to make the code compilable.
The macro has two features:
todo: works like a normal todo.mock: returns the mock value we provide.[dependencies]
mock_todo = { version = "0.1.0", features = ["mock"] }
# use the following commented line if you want to use a regular todo.
# mock_todo = { version = "0.1.0", features = ["todo"] }
use mock_todo::mock_todo;
// returns 0 if the feature is "mock" and panics with the message "not yet implemented: Add feature" otherwise.
fn feature() -> u32 {
// first argument can be ommited.
mock_todo!("Add feature", 0)
}