std: Remove io::io_error
* All I/O now returns IoResult<T> = Result<T, IoError> * All formatting traits now return fmt::Result = IoResult<()> * The if_ok!() macro was added to libstd
This commit is contained in:
parent
be4fc63809
commit
ece8a8f520
35 changed files with 918 additions and 1059 deletions
|
@ -119,6 +119,7 @@ impl Task {
|
|||
|
||||
// Run the task main function, then do some cleanup.
|
||||
f.finally(|| {
|
||||
#[allow(unused_must_use)]
|
||||
fn close_outputs() {
|
||||
let mut task = Local::borrow(None::<Task>);
|
||||
let logger = task.get().logger.take();
|
||||
|
@ -126,8 +127,8 @@ impl Task {
|
|||
let stdout = task.get().stdout.take();
|
||||
drop(task);
|
||||
drop(logger); // loggers are responsible for flushing
|
||||
match stdout { Some(mut w) => w.flush(), None => {} }
|
||||
match stderr { Some(mut w) => w.flush(), None => {} }
|
||||
match stdout { Some(mut w) => { w.flush(); }, None => {} }
|
||||
match stderr { Some(mut w) => { w.flush(); }, None => {} }
|
||||
}
|
||||
|
||||
// First, flush/destroy the user stdout/logger because these
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue