Skip to content

Commit 8579fe6

Browse files
committed
Use as_ref().map() rather than is_some().to_option()
1 parent 6ea4697 commit 8579fe6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_session/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ impl Session {
752752
}
753753

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

758758
pub fn print_perf_stats(&self) {

0 commit comments

Comments
 (0)