Crates.io | replace_err |
lib.rs | replace_err |
version | 1.0.0 |
source | src |
created_at | 2022-04-20 19:05:57.297541 |
updated_at | 2024-01-02 20:34:48.23987 |
description | Adds a `replace_err` method to `Result` which throws away the current error and replaces it. |
homepage | |
repository | https://github.com/alilleybrinker/replace_err |
max_upload_size | |
id | 571108 |
size | 16,187 |
replace_err
Adds a method, replace_err
to Result
which throws away the current error and
replaces it with a new error type, equivalent to result.map_err(|_| new_error_value)
.
This code is dual-licensed MIT and Apache 2.0. Take your pick.