1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-08-08 16:26:35 +02:00

fix raii drop bomb example

This commit is contained in:
Glen De Cauwsemaecker
2025-08-03 21:49:19 +02:00
parent 2923cf3cae
commit 48c5baa6f7

View File

@ -7,6 +7,8 @@ This pattern is often used when the finalizing operation (like `commit()` or
`rollback()`) needs to return a `Result`, which cannot be done from `Drop`.
```rust,editable
use std::io::{self, Write};
struct Transaction {
active: bool,
}