aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-03-27 23:41:46 -0500
committerJesse Luehrs <doy@tozt.net>2013-03-28 18:00:01 -0500
commit9240cf39c3266b54e1f956a10287f58fb9914a3d (patch)
treec03d3411a191c503cb1844473d50bcf029cacb3f /src/util.rs
parentf46dc35425f3cd16c3d05b859b0be15976212510 (diff)
downloadrust-term-9240cf39c3266b54e1f956a10287f58fb9914a3d.tar.gz
rust-term-9240cf39c3266b54e1f956a10287f58fb9914a3d.zip
fix for new 0.6 change
Diffstat (limited to 'src/util.rs')
-rw-r--r--src/util.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util.rs b/src/util.rs
index 9021812..75a28aa 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -1,13 +1,13 @@
-pub fn guard<T> (finally: &fn (), body: &fn () -> T) -> T {
+pub fn guard<T> (finally: ~fn (), body: &fn () -> T) -> T {
let _guard = Guard { finally: finally };
body()
}
-struct Guard<'self> {
- priv finally: &'self fn (),
+struct Guard {
+ priv finally: ~fn (),
}
-impl Drop for Guard<'self> {
+impl Drop for Guard {
fn finalize (&self) {
(self.finally)();
}