You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/defer.rs
+8-16Lines changed: 8 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,13 @@
1
-
/*!
2
-
This module just contains other random implementation stuff.
3
-
*/
1
+
//! This module contains an implementation of Defer.
4
2
use log::error;
5
3
use std::error::Error;
6
4
use std::marker::PhantomData;
7
5
8
-
/**
9
-
Used to defer a closure until the value is dropped.
10
-
11
-
The closure *must* return a `Result<(), _>`, as a reminder to *not* panic; doing so will abort your whole program if it happens during another panic. If the closure returns an `Err`, then it is logged as an `error`.
12
-
13
-
A `Defer` can also be "disarmed", preventing the closure from running at all.
14
-
*/
6
+
/// Used to defer a closure until the value is dropped.
7
+
///
8
+
/// The closure *must* return a `Result<(), _>`, as a reminder to *not* panic; doing so will abort your whole program if it happens during another panic. If the closure returns an `Err`, then it is logged as an `error`.
9
+
///
10
+
/// A `Defer` can also be "disarmed", preventing the closure from running at all.
0 commit comments