Closed jonasmalacofilho closed 2 years ago
Calling me.to_string() from display(me) resulted in infinite recursion and overflowed the stack.
me.to_string()
display(me)
$ cargo test [...] thread 'error::tests::test_display_impls' has overflowed its stack fatal runtime error: stack overflow
This PR removes the recursion to solve the issue, and adds a test case for that (implicit) Display impl.
Display
Additionally, since std::error::Error::description() has been deprecated, its implementation has also been removed.
std::error::Error::description()
Thanks for the fix!
Calling
me.to_string()
fromdisplay(me)
resulted in infinite recursion and overflowed the stack.This PR removes the recursion to solve the issue, and adds a test case for that (implicit)
Display
impl.Additionally, since
std::error::Error::description()
has been deprecated, its implementation has also been removed.