We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4d4a14 commit e22d2bcCopy full SHA for e22d2bc
src/libcore/io.rs
@@ -1108,10 +1108,13 @@ pub mod fsync {
1108
// Artifacts that need to fsync on destruction
1109
pub struct Res<t: Copy> {
1110
arg: Arg<t>,
1111
- drop {
+ }
1112
+
1113
+ impl<T: Copy> Res<T>: Drop {
1114
+ fn finalize(&self) {
1115
match self.arg.opt_level {
- option::None => (),
- option::Some(level) => {
1116
+ None => (),
1117
+ Some(level) => {
1118
// fail hard if not succesful
1119
assert((self.arg.fsync_fn)(self.arg.val, level) != -1);
1120
}
0 commit comments