diff options
| author | Valentin Popov <valentin@popov.link> | 2026-02-12 00:43:40 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-02-12 00:43:40 +0300 |
| commit | 662b292b5b47d0f7df3b19808db746bbc2ecc48c (patch) | |
| tree | df80622739c975eda645acf8754f3331cbdd1c82 /crates/nres/src/error.rs | |
| parent | 3410b54793c3a1808e58d0fae94fb2ebd5f81015 (diff) | |
| download | fparkan-662b292b5b47d0f7df3b19808db746bbc2ecc48c.tar.xz fparkan-662b292b5b47d0f7df3b19808db746bbc2ecc48c.zip | |
feat: обновить методы обработки данных и улучшить обработку ошибок в библиотеке
Diffstat (limited to 'crates/nres/src/error.rs')
| -rw-r--r-- | crates/nres/src/error.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/nres/src/error.rs b/crates/nres/src/error.rs index 0a4dbbe..9a3c651 100644 --- a/crates/nres/src/error.rs +++ b/crates/nres/src/error.rs @@ -100,4 +100,11 @@ impl fmt::Display for Error { } } -impl std::error::Error for Error {} +impl std::error::Error for Error { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + match self { + Self::Io(err) => Some(err), + _ => None, + } + } +} |
