Registry / utility / with-capacity-safe

with-capacity-safe

JSON →
library0.4.2rscratesunverified

A safer alternative to Vec::with_capacity with into_raw_parts which can be used from stable

# Cargo.toml [dependencies] with_capacity_safe = "0.4.2"
INSTALL
IMPORT
SIG · WITH-CAPACITY-SAFE
W
with-capacity-safe
utilityrustv0.4.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WithCapacitySafe
use with_capacity_safe::WithCapacitySafe;

Create a Vec with safe capacity allocation.

use with_capacity_safe::WithCapacitySafe; let vec = Vec::<u8>::with_capacity_safe(10); println!("Capacity: {}", vec.capacity());
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.4.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
with-capacity-safe — cargo add with-capacity-safe · libregistry