3 ms·
...then don't use unwrap(). Instead check the error, do whatever handling you want and exit gracefully. unwrap()'s behaviour is essentially the same thing as a
by pixel_fcker 9y ago
...then don't use unwrap(). Instead check the error, do whatever handling you want and exit gracefully.
unwrap()'s behaviour is essentially the same thing as an uncaught exception in Python, only you can actually check for where they occur in the code with a simple grep rather than hoping your test suite caught every possible failure case.