#container #drop #no_std

no-std nodrop

A wrapper type to inhibit drop (destructor). Use std::mem::ManuallyDrop instead!

14 releases

0.1.13 Nov 12, 2018
0.1.12 Oct 27, 2017
0.1.9 Feb 23, 2017
0.1.8 Sep 6, 2016
0.1.4 Jun 14, 2015

#6 in Rust patterns

Download history 72688/week @ 2019-04-29 72626/week @ 2019-05-06 78115/week @ 2019-05-13 85101/week @ 2019-05-20 85406/week @ 2019-05-27 90382/week @ 2019-06-03 91195/week @ 2019-06-10 91837/week @ 2019-06-17 92280/week @ 2019-06-24 84991/week @ 2019-07-01 86847/week @ 2019-07-08 89285/week @ 2019-07-15 90958/week @ 2019-07-22 93130/week @ 2019-07-29 98935/week @ 2019-08-05

334,359 downloads per month
Used in 3,829 crates (12 directly)

MIT/Apache

10KB
150 lines

nodrop

Recent Changes (nodrop)

  • 0.1.12
    • Remove dependency on crate odds.
  • 0.1.11
    • Remove erronous assertion in test (#77)
  • 0.1.10
    • Update for stable needs_drop (Rust 1.21, was nightly only)
  • 0.1.9
    • Fix issue in recent nightly where repr(u8) did not work. Use a better way to get rid of the enum layout optimization.
  • 0.1.8
    • Add crate feature use_union that uses untagged unions to implement NoDrop. Finally we have an implementation without hacks, without a runtime flag, and without an actual Drop impl (which was needed to suppress drop). The crate feature requires nightly and is unstable.
  • 0.1.7
    • Remove crate feature no_drop_flag, because it doesn't compile on nightly anymore. Drop flags are gone anyway!
  • 0.1.6
    • Add feature std, which you can opt out of to use no_std.
  • 0.1.5
    • Added crate feature use_needs_drop which is a nightly-only optimization, which skips overwriting if the inner value does not need drop.

License

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.

Dependencies