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

fix build (en) step: scopeguard crate import

This commit is contained in:
Glen De Cauwsemaecker
2025-07-15 20:57:53 +02:00
parent f4269b7f75
commit bb88a79027

View File

@ -3,7 +3,7 @@
A scope guard makes use of the `Drop` trait to run a given closure when it goes
out of scope.
```rust
```rust,editable,compile_fail
use scopeguard::{ScopeGuard, guard};
use std::{
fs::{self, File},
@ -48,7 +48,7 @@ fn main() {
be simplified using
[scopeguard's `defer!` macro](https://docs.rs/scopeguard/latest/scopeguard/#defer):
```rust
```rust,editable,compile_fail
let path = "temp.txt";
scopeguard::defer! {