secana@programming.dev to Rust@programming.dev · 5 months agoDioxus Labs + “High-level Rustdioxus.notion.siteexternal-linkmessage-square19fedilinkarrow-up138arrow-down14
arrow-up134arrow-down1external-linkDioxus Labs + “High-level Rustdioxus.notion.sitesecana@programming.dev to Rust@programming.dev · 5 months agomessage-square19fedilink
minus-squaretaladar@sh.itjust.workslinkfedilinkarrow-up2·5 months agoNo, I actually meant it as in the traditional meaning of literally. As in [lints.clippy] unwrap_used = "warn" expect_used = "warn" along with a pre-commit hook that does cargo clippy -D warnings (deny warnings). There are always better ways to write an unwrap, usually via pattern matching and handling the error cases properly, at the very least logging them.
No, I actually meant it as in the traditional meaning of literally. As in
[lints.clippy] unwrap_used = "warn" expect_used = "warn"
along with a pre-commit hook that does
cargo clippy -D warnings
(deny warnings).
There are always better ways to write an unwrap, usually via pattern matching and handling the error cases properly, at the very least logging them.