CodeChain-io / CodeChain-io/codechain

Need an assertion policy

未關閉
#197 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Rust
星號
256
分支
50
PR 合併指標
30 天內沒有已合併 PR

描述

Currently, we use `debug_assert` in most cases because we check the assertions in tests and we don't want to check them again in the release binary.

But it's not sustainable. Bugs will occur for any reason. It seems better to use `assert` to crash early because we have a plan to add [a bug tracker](https://github.com/CodeChain-io/codechain/issues/196).

I think we need a guideline to decide when to use `assert` or `debug_assert`.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。