Remove unused field from IncrCompSession.

This commit is contained in:
Nicholas Nethercote 2023-11-30 11:54:32 +11:00
parent 4b90b26fd8
commit e065d96b08
2 changed files with 5 additions and 11 deletions

View file

@ -262,7 +262,7 @@ pub(crate) fn prepare_session_directory(
directory."
);
sess.init_incr_comp_session(session_dir, directory_lock, false);
sess.init_incr_comp_session(session_dir, directory_lock);
return Ok(());
};
@ -276,7 +276,7 @@ pub(crate) fn prepare_session_directory(
sess.emit_warning(errors::HardLinkFailed { path: &session_dir });
}
sess.init_incr_comp_session(session_dir, directory_lock, true);
sess.init_incr_comp_session(session_dir, directory_lock);
return Ok(());
} else {
debug!("copying failed - trying next directory");

View file

@ -814,12 +814,7 @@ pub fn get_tools_search_paths(&self, self_contained: bool) -> Vec<PathBuf> {
if self_contained { vec![p.clone(), p.join("self-contained")] } else { vec![p] }
}
pub fn init_incr_comp_session(
&self,
session_dir: PathBuf,
lock_file: flock::Lock,
load_dep_graph: bool,
) {
pub fn init_incr_comp_session(&self, session_dir: PathBuf, lock_file: flock::Lock) {
let mut incr_comp_session = self.incr_comp_session.borrow_mut();
if let IncrCompSession::NotInitialized = *incr_comp_session {
@ -827,8 +822,7 @@ pub fn init_incr_comp_session(
panic!("Trying to initialize IncrCompSession `{:?}`", *incr_comp_session)
}
*incr_comp_session =
IncrCompSession::Active { session_directory: session_dir, lock_file, load_dep_graph };
*incr_comp_session = IncrCompSession::Active { session_directory: session_dir, lock_file };
}
pub fn finalize_incr_comp_session(&self, new_directory_path: PathBuf) {
@ -1686,7 +1680,7 @@ enum IncrCompSession {
NotInitialized,
/// This is the state during which the session directory is private and can
/// be modified.
Active { session_directory: PathBuf, lock_file: flock::Lock, load_dep_graph: bool },
Active { session_directory: PathBuf, lock_file: flock::Lock },
/// This is the state after the session directory has been finalized. In this
/// state, the contents of the directory must not be modified any more.
Finalized { session_directory: PathBuf },