You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.
Previously, we decided during charlotte_core development that assert!() macros are to be avoided. They are unambigious, coming from a C environment might make you think that they are compile time asserts, in reality, they are runtime checks in Rust. Additionally, they panic, the whole point of this repository is to provide a non-panicing alloc module. Note: debug_alloc!() is NOT included in release builds, but they are included in debug build. I believe we should not be using any of the assert!()-s to keep things simple. Especially in this library, since panicing here is fatal for the OS.
Files such as lib.rs do use debug_assert!() statements, please either remove them, or even better, somehow check them but without panicing. Returning a Result is one way of fixing these things, another would be to use the already discussed "callback logger".
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Previously, we decided during
charlotte_core
development thatassert!()
macros are to be avoided. They are unambigious, coming from a C environment might make you think that they are compile time asserts, in reality, they are runtime checks in Rust. Additionally, they panic, the whole point of this repository is to provide a non-panicingalloc
module. Note:debug_alloc!()
is NOT included in release builds, but they are included in debug build. I believe we should not be using any of theassert!()
-s to keep things simple. Especially in this library, since panicing here is fatal for the OS.Files such as lib.rs do use
debug_assert!()
statements, please either remove them, or even better, somehow check them but without panicing. Returning aResult
is one way of fixing these things, another would be to use the already discussed "callback logger".The text was updated successfully, but these errors were encountered: