I really strongly prefer unwrap to if let _ after introducing a hard to track down error into a project. I just knew it could never error. I was wrong. At least in the unwrap case it blows up rather than failing silently.
Thanks. That makes a lot of sense and I hadn’t considered that as a possibilty. I guess using unwrap makes it clear that you expect the operation to succeed even if you don’t care about the return value.
I really strongly prefer unwrap to if let _ after introducing a hard to track down error into a project. I just knew it could never error. I was wrong. At least in the unwrap case it blows up rather than failing silently.
Thanks. That makes a lot of sense and I hadn’t considered that as a possibilty. I guess using
unwrapmakes it clear that you expect the operation to succeed even if you don’t care about the return value.