I need this feature for a project.
I've started working on it here.
I would like to known if this feature is interesting to upstream.
The existing panic behavior is from indexing and unwrapping. For the indexing I created a trait GetAt and used it instead of direct indexing. The trait has an implementation that uses [] and other that uses get_unchecked. For the unwrapping, I used if let and panic in the else clause. But there is the question of what to do in non panic mode.
I need this feature for a project.
I've started working on it here.
I would like to known if this feature is interesting to upstream.
The existing panic behavior is from indexing and unwrapping. For the indexing I created a trait
GetAtand used it instead of direct indexing. The trait has an implementation that uses[]and other that usesget_unchecked. For the unwrapping, I usedif letand panic in theelseclause. But there is the question of what to do in non panic mode.