Skip to content

Commit 5391c54

Browse files
committed
Add larger ptr-union types
1 parent a1bc159 commit 5391c54

File tree

4 files changed

+305
-130
lines changed

4 files changed

+305
-130
lines changed

Cargo.lock

Lines changed: 7 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ptr-union/Cargo.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ptr-union"
3-
version = "2.1.0"
3+
version = "2.2.0"
44
edition = "2018"
55

66
authors = ["Christopher Durham (cad97) <[email protected]>"]
@@ -14,22 +14,19 @@ license = "MIT OR Apache-2.0"
1414
[package.metadata.workspaces]
1515
independent = true
1616

17-
[badges]
18-
maintenance = { status = "passively-maintained" }
19-
2017
[features]
2118
default = ["alloc"]
2219
alloc = ["erasable/alloc"]
2320

2421
[dependencies]
25-
paste = "0.1.10"
22+
paste = "1.0.6"
2623

2724
[dependencies.erasable]
2825
version = "1.0.0"
2926
path = "../erasable"
3027

3128
[build-dependencies]
32-
autocfg = "1.0.0"
29+
autocfg = "1.1.0"
3330

3431
[[test]]
3532
name = "smoke"

crates/ptr-union/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ by storing the tag in the alignment bits.
33

44
## Changelist
55

6+
### 2.2.0
7+
#### Added
8+
9+
- `Union8` and `Union16` types. You can now use up to the four low bits for a
10+
tagged pointer.
11+
- `Union*` now has safe `new_$variant` and `try_deref` methods, and `Enum*` has
12+
a `try_pack` method. These do a dynamic alignment check that the pointer is
13+
sufficiently aligned, and allow `Union` types to be used without `unsafe`.
14+
615
### 2.1.0
716
#### Added
817

0 commit comments

Comments
 (0)