Comments (5)
Test cases (abusing rust's panic on drop -> abort).
#[test]
#[should_panic]
fn test_drop_panic() {
struct DropPanic;
impl Drop for DropPanic {
fn drop(&mut self) {
panic!("drop");
}
}
let mut array = ArrayVec::<[DropPanic; 1]>::new();
array.push(DropPanic);
}
#[test]
#[should_panic]
fn test_drop_panic_into_iter() {
struct DropPanic;
impl Drop for DropPanic {
fn drop(&mut self) {
panic!("drop");
}
}
let mut array = ArrayVec::<[DropPanic; 1]>::new();
array.push(DropPanic);
array.into_iter();
}
from arrayvec.
Thanks! I guess this won't be easy..
from arrayvec.
For the lols, please read #5. Hey you said you would leave it for me to fix! But I do think you have the sane version, and I the insane..
from arrayvec.
Fixed in version 0.3.10. Use (unstable) feature flag nodrop/no_drop_flag to recover size. (However, it's not completely equivalent in terms of overhead, even if the size is the same.)
from arrayvec.
Great, now it's fixed in smallvec too.
from arrayvec.
Related Issues (20)
- Const generics are unstable HOT 1
- Minimum Rust version supported HOT 3
- Add From/Into conversion into Vec and Box<[T]>
- Feature request: Implement `Index` and `IndexMut` HOT 2
- [ArrayString] Infallible constructor to fill inner array HOT 10
- bencher::black_box does not stop benchmark(s) from being optimized out
- implement std::fmt::Write HOT 3
- Issues from Fuchsia review HOT 1
- Const constructor for strings via a macro? HOT 3
- `insert` and `try_insert` for `ArrayString`? HOT 1
- having a TinyVec that fallback to heap HOT 4
- [feature] Implement `rayon::iter::FromParallelIterator` for `ArrayVec`.
- Consider `#[track_caller]` on functions that panic HOT 3
- [feature] Support picking the indexing type HOT 1
- Use `NonMaxU32` instead of `u32` as a length container to reduce `Option<ArrayVec>` size. HOT 12
- Miri doesn't accept same algorithm with `ArrayVec::retain` while accepting `Vec::retain` HOT 3
- Why is `ArrayVec::new_const` needed instead of having const `ArrayVec::new`? HOT 1
- Why are inherent associated functions of `ArrayVec` implemented via calls to trait-associated functions of `ArrayVecImpl` and not vice versa? HOT 1
- Add `From<[T; LEN]>` HOT 1
- Is this project still alive? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arrayvec.