mirror of
https://github.com/dnlbauer/xdrfile.git
synced 2026-09-10 22:25:30 +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)> {
|
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
|
||||||
if let Some(e) = &self.code {
|
if let Some(e) = &self.code {
|
||||||
Some(e)
|
Some(e)
|
||||||
|
} else if let ErrorTask::ToCString(Some(e)) = &self.task {
|
||||||
|
Some(e)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user