diff options
Diffstat (limited to 'src/components/util/io.rs')
-rw-r--r-- | src/components/util/io.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/util/io.rs b/src/components/util/io.rs index 45009723774..b034682cf16 100644 --- a/src/components/util/io.rs +++ b/src/components/util/io.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use std::rt::io::{io_error, IoError}; +use std::io::{io_error, IoError}; /// Helper for catching an I/O error and wrapping it in a Result object. The /// return result will be the last I/O error that happened or the result of the @@ -10,7 +10,7 @@ use std::rt::io::{io_error, IoError}; /// /// FIXME: This is a copy of std::rt::io::result which doesn't exist yet in our /// version of Rust. We should switch after the next Rust upgrade. -pub fn result<T>(cb: &fn() -> T) -> Result<T, IoError> { +pub fn result<T>(cb: || -> T) -> Result<T, IoError> { let mut err = None; let ret = io_error::cond.trap(|e| err = Some(e)).inside(cb); match err { |