Easy Rust 046: Result part 2

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Your training makes learning to code fun. Thanks for these videos brother.

andydataguy
Автор

I don't like the "is_ok" and "is_some" methods with "unwrap", if you have multiple option types and you check for all of them and then unwrap then sure, it will work fine, but then you add or remove one and forget to add the check and you have an panic error. With the match statement that cannot happen, because the compiler will check it at compile time when you are pulling the variariable out of the some or ok option in the match arm, so it is "impossible" to make a mistake.

kajacx