| ▲ | sayrer 3 hours ago |
| Yes, can't have .unwrap() in production code (it's ok in tests) |
|
| ▲ | orphea 3 hours ago | parent | next [-] |
| Like goto, unwrap is just a tool that has its use cases. No need to make a boogeyman out of it. |
| |
| ▲ | metaltyphoon 2 hours ago | parent | next [-] | | Yes it's meant to be used in test code. If you're sure it can't fail do then use .expect() that way it shows you made a choice and it wasn't just a dev oversight. | |
| ▲ | fwjafwasd 2 hours ago | parent | prev | next [-] | | panicans should be using .expect() in production | |
| ▲ | gishh 3 hours ago | parent | prev [-] | | To be fair, if you’re not “this tall” you really shouldn’t consider using goto in a c program. Most people aren’t that tall. |
|
|
| ▲ | keyle 3 hours ago | parent | prev [-] |
| unwrap itself isn't the problem... |