thin-vec icon indicating copy to clipboard operation
thin-vec copied to clipboard

A Vec That Has a Smaller size_of

Results 19 thin-vec issues
Sort by recently updated
recently updated
newest added

Add a method for converting a ptr that was acquired through a thin_vec back into a ThinVec, similar to the `from_raw_parts` method in the standard library but with just the...

I am not sure if there are any technical blockers on this... can `ThinVec::new` be made `const`? Having to reinitialize every instance causes a _very_ slight regression when I moved...

I realize that given the `nsTArray` mentions in the documentation this is probably out of scope, so feel free to just close this, but here I go anyway: The conversion...

On i686, the u64 test sometimes fails because the required alignment is 4-bytes, not 8-bytes. Closes #56 Co-authored-by: Peter Michael Green

``` failures: ---- tests::test_data_ptr_alignment stdout ---- thread 'tests::test_data_ptr_alignment' panicked at 'assertion failed: v.data_raw() as usize % 8 == 0', src/lib.rs:2666:9 ```

Inside `header_with_capacity()`, the calls to `set_cap()` and `set_len()` seem to create a mutable ref to uninitialized data. This change uses `std::ptr::write()` to avoid creating a reference until the header is...

Since we only ever `ptr::read` from the references returned by `self.iter.next()`, they can just as well be shared references as mutable ones, so we use `Iter` instead of `IterMut` to...

Is there an intended MSRV policy for `thin-vec`? Currently, the crate itself compiles under [Rust 1.53.0](https://releases.rs/docs/1.53.0/#libraries) (released 2021-06-17) at the earliest, due to the use of the [``](https://github.com/Gankra/thin-vec/blob/main/src/lib.rs#L2020) impl added...

Currently, enabling the `unstable` cargo feature of `thin-vec` does not enable the Rust nightly feature `trusted_len`, so `cargo +nightly build --features=unstable` always fails. This PR adds `#![cfg_attr(feature = "unstable", feature(trusted_len))]`...

I have a µcontroller that suffers with the push's including a branch on the len check (no branch predictor). I would like to reserve sufficient space, then push unchecked to...