Skip to content
Permalink
Browse files

Use `as_ref().map()` rather than `is_some().to_option()`

  • Loading branch information
varkor committed Oct 13, 2019
1 parent 6ea4697 commit 8579fe6fc3a28e5a7cbd95ada3a3305a73782c82
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/librustc_session/session.rs
@@ -752,7 +752,7 @@ impl Session {
}

pub fn incr_comp_session_dir_opt(&self) -> Option<cell::Ref<'_, PathBuf>> {
self.opts.incremental.is_some().to_option_with(|| self.incr_comp_session_dir())
self.opts.incremental.as_ref().map(|_| self.incr_comp_session_dir())
}

pub fn print_perf_stats(&self) {

0 comments on commit 8579fe6

Please sign in to comment.
You can’t perform that action at this time.