run-on-drop 1.0.0

Run code when an object is dropped
Documentation
# run-on-drop

[![crates.io](https://img.shields.io/crates/v/run-on-drop.svg)](http://crates.io/crates/run-on-drop)
[![docs.rs](https://docs.rs/run-on-drop/badge.svg)](http://docs.rs/run-on-drop)
![MSRV](https://img.shields.io/crates/msrv/run-on-drop)

This crate provides a closure wrapper that will run the closure when it is dropped.

## Example

```rust
use run_on_drop::on_drop;

let object = create_object();
let cleanup = on_drop(|| destroy_object(&object));
initialize_object(&object); // might unwind
cleanup.forget();
return object;
```

## MSRV

The MSRV is `max(stable - 3)`.

## License

This project is licensed under either of

- Apache License, Version 2.0
- MIT License

at your option.