Josh Stone

Results 817 comments of Josh Stone

RHEL 9.4 and 8.10 both have Rust 1.75, so they have `OnceCell` and `OnceLock` now. Rust 1.80 will be a while yet for RHEL to get `LazyCell` and `LazyLock`, but...

I didn't notice #400 before, but I think that's doing a lot more than is really needed for the immediate problem. For instance, I don't think it's important to compare...

> Well, `get_or_insert` can be rewritten to `Entry` by slightly changing `OccupiedEntry::key`, namely by adding the lifetime `'a` to the key `K` (`pub fn key(&self) -> &'a K`). That would...

This was inspired by bluss/indexmap#183, and the name by a database `VACUUM`, like [PostgreSQL](https://www.postgresql.org/docs/current/sql-vacuum.html) or [SQLite](https://www.sqlite.org/lang_vacuum.html). If there's interest, I could also add methods to `HashMap` and `HashSet`.

I'm trying to provide an option for the concern in https://github.com/bluss/indexmap/issues/183#issuecomment-809614807: > OK, so I guess that means I shouldn't use `IndexMap` in a scenario where I don't want to...

I missed [`RawTable::allocation_info`](https://docs.rs/hashbrown/latest/hashbrown/raw/struct.RawTable.html#method.allocation_info) when I answered before, and you can get access to that through [`HashMap::raw_table`](https://docs.rs/hashbrown/latest/hashbrown/hash_map/struct.HashMap.html#method.raw_table). However, the "raw" feature has been removed in #546 for the upcoming 0.15.

How do you know it's unhandled if a 3rd party derive might use it? Or is the assertion that `#[skip(_)]` is **only** going to be allowed for builtins?

> I was a bit unclear: the idea is that you still take a `String` to handle the case where you have to allocate more room, but that that case...

> I dislike having tests say they pass when they've actually not run, Maybe we need additional capabilities in test return values? We can already return `Result` for pass/fail, but...