Added indexing methods to raw entries: RawEntryBuilder::from_hash_full,
RawEntryBuilder::index_from_hash, and RawEntryMut::index.
2.2.1
Corrected the signature of RawOccupiedEntryMut::into_key(self) -> &'a mut K,
This a breaking change from 2.2.0, but that version was published for less
than a day and has now been yanked.
2.2.0
The new IndexMap::get_index_entry method finds an entry by its index for
in-place manipulation.
The Keys iterator now implements Index<usize> for quick access to the
entry's key, compared to indexing the map to get the value.
The new IndexMap::splice and IndexSet::splice methods will drain the
given range as an iterator, and then replace that range with entries from
an input iterator.
The new trait RawEntryApiV1 offers opt-in access to a raw entry API for
IndexMap, corresponding to the unstable API on HashSet as of Rust 1.75.
Many IndexMap and IndexSet methods have relaxed their type constraints,
e.g. removing K: Hash on methods that don't actually need to hash.
Removal methods remove, remove_entry, and take are now deprecated
in favor of their shift_ or swap_ prefixed variants, which are more
explicit about their effect on the index and order of remaining items.
The deprecated methods will remain to guide drop-in replacements from
HashMap and HashSet toward the prefixed methods.
Commits
1a50e7b Merge pull request #305 from cuviper/raw_entry-index
The EnumVariantNames macro has been renamed VariantNames. The deprecation warning should steer you in
the right direction for fixing the warning.
The Iterator struct generated by EnumIter now has new bounds on it. This shouldn't break code unless you manually
added the implementation in your code.
Display now supports format strings using named fields in the enum variant. This should be a no-op for most code.
However, if you were outputting a string like "Hello {field}", this will now be interpretted as a format string.
EnumDiscriminant now inherits the repr and discriminant values from your main enum. This makes the discriminant type
closer to a mirror of the original and that's always the goal.
New features
The VariantArray macro has been added. This macro adds an associated constant VARIANTS to your enum. The constant
is a &'static [Self] slice so that you can access all the variants of your enum. This only works on enums that only
have unit variants.
use strum::VariantArray;
#[derive(Debug, VariantArray)]
enum Color {
Red,
Blue,
Green,
}
The EnumTable macro has been experimentally added. This macro adds a new type that stores an item for each variant
of the enum. This is useful for storing a value for each variant of an enum. This is an experimental feature because
I'm not convinced the current api surface area is correct.
use strum::EnumTable;
#[derive(Copy, Clone, Debug, EnumTable)]
enum Color {
Red,
Blue,
The EnumVariantNames macro has been renamed VariantNames. The deprecation warning should steer you in
the right direction for fixing the warning.
The Iterator struct generated by EnumIter now has new bounds on it. This shouldn't break code unless you manually
added the implementation in your code.
Display now supports format strings using named fields in the enum variant. This should be a no-op for most code.
However, if you were outputting a string like "Hello {field}", this will now be interpretted as a format string.
EnumDiscriminant now inherits the repr and discriminant values from your main enum. This makes the discriminant type
closer to a mirror of the original and that's always the goal.
New features
The VariantArray macro has been added. This macro adds an associated constant VARIANTS to your enum. The constant
is a &'static [Self] slice so that you can access all the variants of your enum. This only works on enums that only
have unit variants.
use strum::VariantArray;
#[derive(Debug, VariantArray)]
enum Color {
Red,
Blue,
Green,
}
The EnumTable macro has been experimentally added. This macro adds a new type that stores an item for each variant
of the enum. This is useful for storing a value for each variant of an enum. This is an experimental feature because
I'm not convinced the current api surface area is correct.
use strum::EnumTable;
#[derive(Copy, Clone, Debug, EnumTable)]
enum Color {
Red,
Blue,
Green,
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the language-server-deps group with 3 updates: indexmap, strum and tokio.
Updates
indexmap
from 2.1.0 to 2.2.2Changelog
Sourced from indexmap's changelog.
Commits
1a50e7b
Merge pull request #305 from cuviper/raw_entry-indexf4bb006
Release 2.2.254a42ec
Add indexing methods to raw entry7264ce4
Merge pull request #304 from cuviper/raw-into_key244bd81
FixRawOccupiedEntryMut::into_key
7107c49
Merge pull request #303 from cuviper/test-updates34a7af7
Allowclippy::style
382a45c
Upgrade dev-dep itertools to 0.12904689f
ci: upgrade to actions/checkout@v4405fa10
Merge pull request #302 from cuviper/release-2.2.0Updates
strum
from 0.25.0 to 0.26.1Release notes
Sourced from strum's releases.
... (truncated)
Changelog
Sourced from strum's changelog.
... (truncated)
Commits
Updates
tokio
from 1.35.1 to 1.36.0Release notes
Sourced from tokio's releases.
... (truncated)
Commits
eaf81ed
chore: prepare Tokio v1.36.0 (#6312)53f9e5a
ci: make sure dictionary words are sorted and unique (#6316)9077762
net: expose keepalive option onTcpSocket
(#6311)131e7b4
ci: add spellchecking (#6297)e53b92a
io: clarifyclear_ready
docs (#6304)7536132
sync: use AtomicBool in broadcast channel future (#6298)b6d0c90
macros: fix trait_method breaking change detection (#6308)4846959
runtime: remove obsolete comment (#6303)ec30383
net: addUnixSocket
(#6290)f80bbec
io: simplify check for empty slice (#6293)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show