mirror of
https://github.com/dnlbauer/xdrfile.git
synced 2026-09-10 14:15:31 +00:00
Added ToCString variant to Error.source()
This commit is contained in:
@@ -126,6 +126,8 @@ impl std::error::Error for Error {
|
||||
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
|
||||
if let Some(e) = &self.code {
|
||||
Some(e)
|
||||
} else if let ErrorTask::ToCString(Some(e)) = &self.task {
|
||||
Some(e)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user