Skip to content

Add Buckets#36

Merged
ibraheemdev merged 8 commits intoibraheemdev:masterfrom
SabrinaJewson:buckets
Aug 1, 2025
Merged

Add Buckets#36
ibraheemdev merged 8 commits intoibraheemdev:masterfrom
SabrinaJewson:buckets

Conversation

@SabrinaJewson
Copy link
Contributor

@SabrinaJewson SabrinaJewson commented Jun 19, 2025

Split off from #31. The notes from #31 (comment) still apply.

(Right… I need to fix merge conflicts. I will do so soon.)

@SabrinaJewson
Copy link
Contributor Author

Alright, fixed the conflicts.

Copy link
Owner

@ibraheemdev ibraheemdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a couple of (hopefully minor) comments, otherwise this looks good. I appreciate the thoroughness here.

Is the MSRV bump absolutely necessary, or are there ways to work around the features being used? 1.81 is quite a big jump, but I wouldn't consider it a breaking change.

@SabrinaJewson
Copy link
Contributor Author

SabrinaJewson commented Jul 13, 2025

So re MSRV concerns, the currently used features that are nontrivial to replace are:

  • assert_unchecked (inside Index::new_unchecked): 1.81.0
  • const Option::unwrap, three times: 1.83.0

Polyfilling the later (either inline or with a helper) is possible, yes, so I could implement that. The former is not possible to polyfill, but I could just panic in new_unchecked instead. Thoughts?

(also, thoughts on boxcar::Iter being moved to boxcar::vec::Iter – should I reexport it?)

@ibraheemdev
Copy link
Owner

Can you use hint::unreachable_unchecked for the former?

Yeah, we can re-export until the next breaking change.

@SabrinaJewson
Copy link
Contributor Author

…You’re right, I’m embarrassed I forgot unreachable_unchecked exists. Made the changes. Now it’s just complaining that I made the re-exports #[doc(hidden)]… it kind of makes sense to me as a way to soft-deprecate it, but I guess I can just not have it be #[doc(hidden)] as well lol.

Once in a blue moon I have to think about unwind safety, and every time
I do I forget everything I learnt last time.
@ibraheemdev
Copy link
Owner

This looks great, thanks! I'll cut a release soon.

@ibraheemdev ibraheemdev merged commit d532880 into ibraheemdev:master Aug 1, 2025
14 checks passed
@SabrinaJewson SabrinaJewson deleted the buckets branch August 1, 2025 17:14
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

Comments