Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use as_ref().map() rather than is_some().to_option()
  • Loading branch information
varkor committed Dec 6, 2019
1 parent 6ea4697 commit 8579fe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_session/session.rs
Expand Up @@ -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) {
Expand Down

0 comments on commit 8579fe6

Please sign in to comment.