簡單的刪除實現
use std::ops::Drop;
struct Foo(usize);
impl Drop for Foo {
fn drop(&mut self) {
println!("I had a {}", self.0);
}
}
use std::ops::Drop;
struct Foo(usize);
impl Drop for Foo {
fn drop(&mut self) {
println!("I had a {}", self.0);
}
}