| Crates.io | unwrap_or_log |
| lib.rs | unwrap_or_log |
| version | 0.2.0 |
| created_at | 2024-02-22 14:12:09.490113+00 |
| updated_at | 2024-02-26 11:52:05.322258+00 |
| description | A simple crate adding two functions to all std::resut::Result to log errors using the log crate |
| homepage | |
| repository | https://github.com/ninomerlino/unwrap_or_log |
| max_upload_size | |
| id | 1149363 |
| size | 5,245 |
This crate adds a function to all [std::results::Result<T,E>] where E implements [std::error::Error] by implementing the trait [LogError] for them
The trait [LogError] exposes a function [LogError::log_error] that takes a result, logs it if it's an error and returns it unmodified: