Skip to content

Conversation

@thetarnav
Copy link
Contributor

@thetarnav thetarnav commented Nov 6, 2025

Looks like a lot of procedures in the slice package could use a "contextless" calling convention as most don't require context. Some procedures there already were contextless, but it was applied inconsistently—why would to_bytes be contextless, but not to_type.
Let me know if some of these should require context by design or something.

@Barinzaya
Copy link
Contributor

Barinzaya commented Nov 30, 2025

The main consequence of this is that anything that can fail a bounds check (e.g. swap, split_first) will no longer be able to use context.assertion_failure_proc to allow for the panic behavior to be overridden (e.g. to "catch" the panic, or to log it).

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.

2 participants