Skip to content

feat: debug_ensure{,_eq,_ne} macros combining debug_assert* and anyhow::ensure (#6907) #6922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: link2xt/pgp-contacts
Choose a base branch
from

Conversation

iequidoo
Copy link
Collaborator

@iequidoo iequidoo commented Jun 16, 2025

See commit messages.
Still sometimes we don't want to error out in the release conf if the error isn't critical (in which case it's better to log a warning as @Hocuri suggested in #6907). Need to recheck all assertions and create a follow-up PR.

@iequidoo iequidoo force-pushed the iequidoo/debug_ensure branch from 1deedb1 to 6362989 Compare June 16, 2025 23:06
@iequidoo iequidoo requested review from Hocuri and link2xt June 16, 2025 23:16
…w::ensure (#6907)

We have some debug assertions already, but we also want the corresponding errors in the release
configuration so that it's not less reliable than non-optimized one. This doesn't change any
function signatures, only debug assertions in functions returning `Result` are replaced.
@iequidoo iequidoo force-pushed the iequidoo/debug_ensure branch from 6362989 to 3b165d1 Compare June 16, 2025 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant