Skip to content

Add a capacity() function to FrozenVec<T> - #100

Merged
Manishearth merged 1 commit into
Manishearth:masterfrom
leo-olivier:master
Apr 7, 2026
Merged

Add a capacity() function to FrozenVec<T>#100
Manishearth merged 1 commit into
Manishearth:masterfrom
leo-olivier:master

Conversation

@leo-olivier

Copy link
Copy Markdown
Contributor

It is often useful to know the capacity of a Vec. For example, the deepsize crate (DeepSizeOf trait) provides an estimation of the size of a Vec in memory. Currently, FrozenVec does not expose a capacity() function, which makes it difficult to account for the allocated heap memory of the underlying storage. This PR add a function to FrozenVec<T> that return the capacity of the underlying Vec.

@Manishearth
Manishearth merged commit 91944aa into Manishearth:master Apr 7, 2026
1 check passed
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