Skip to content

Commit ade8b02

Browse files
Remove unnecessary channel
1 parent eea2f87 commit ade8b02

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/librustdoc/lib.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ use std::default::Default;
4444
use std::env;
4545
use std::panic;
4646
use std::process;
47-
use std::sync::mpsc::channel;
4847

4948
use rustc::session::{early_warn, early_error};
5049
use rustc::session::config::{ErrorOutputType, RustcOptGroup};
@@ -452,8 +451,6 @@ where R: 'static + Send,
452451
// First, parse the crate and extract all relevant information.
453452
info!("starting to run rustc");
454453

455-
let (tx, rx) = channel();
456-
457454
let result = rustc_driver::report_ices_to_stderr_if_any(move || {
458455
let crate_name = options.crate_name.clone();
459456
let crate_version = options.crate_version.clone();
@@ -467,15 +464,15 @@ where R: 'static + Send,
467464

468465
krate.version = crate_version;
469466

470-
tx.send(f(Output {
467+
f(Output {
471468
krate: krate,
472469
renderinfo: renderinfo,
473470
renderopts,
474-
})).unwrap();
471+
})
475472
});
476473

477474
match result {
478-
Ok(()) => rx.recv().unwrap(),
475+
Ok(output) => output,
479476
Err(_) => panic::resume_unwind(Box::new(errors::FatalErrorMarker)),
480477
}
481478
}

0 commit comments

Comments
 (0)