3 ms·
I think the C code presented and the rust code presented are approximately equal in their levels of quick and dirty. Using "expect" is the quick and dirty way
by aidenn0 11y ago
I think the C code presented and the rust code presented are approximately equal in their levels of quick and dirty. Using "expect" is the quick and dirty way of ignoring the error case in Rust, and doing nothing is the quick and dirty was of ignoring the error in C. Perhaps "unwrap" is more quick and dirty, but it still fails much faster and with less damage than the quick and dirty C code.