dtolnay / no-panic

Attribute macro to require that the compiler prove a function can't ever panic
Apache License 2.0
1k stars 13 forks source link

enabling in release-only or using feature #13

Closed jadamcrain closed 4 years ago

jadamcrain commented 4 years ago

" either make no-panic an optional dependency that you only enable in release builds"

Being fairly new to cfg_attr and the like, what's the best way to accomplish this?

dtolnay commented 4 years ago

The ryu crate at https://github.com/dtolnay/ryu demonstrates this approach.

jadamcrain commented 4 years ago

you rock. Thanks. What a great tool.