diff --git a/lib/src/default_index/store.rs b/lib/src/default_index/store.rs index a751ef9bff..5606508c6d 100644 --- a/lib/src/default_index/store.rs +++ b/lib/src/default_index/store.rs @@ -359,14 +359,14 @@ impl IndexStore for DefaultIndexStore { fn write_index( &self, index: Box, - op_id: &OperationId, + op: &Operation, ) -> Result, IndexWriteError> { let index = index .into_any() .downcast::() .expect("index to merge in must be a DefaultMutableIndex"); let index_segment = self - .save_mutable_index(*index, op_id) + .save_mutable_index(*index, op.id()) .map_err(|err| IndexWriteError(err.into()))?; Ok(Box::new(DefaultReadonlyIndex::from_segment(index_segment))) } diff --git a/lib/src/index.rs b/lib/src/index.rs index 70d8880eb8..0e74d7ec87 100644 --- a/lib/src/index.rs +++ b/lib/src/index.rs @@ -23,7 +23,6 @@ use thiserror::Error; use crate::backend::{ChangeId, CommitId}; use crate::commit::Commit; use crate::object_id::{HexPrefix, PrefixResolution}; -use crate::op_store::OperationId; use crate::operation::Operation; use crate::revset::{ResolvedExpression, Revset, RevsetEvaluationError}; use crate::store::Store; @@ -67,7 +66,7 @@ pub trait IndexStore: Send + Sync + Debug { fn write_index( &self, index: Box, - op_id: &OperationId, + op: &Operation, ) -> Result, IndexWriteError>; } diff --git a/lib/src/transaction.rs b/lib/src/transaction.rs index 61de87fb9d..bc4e4040a2 100644 --- a/lib/src/transaction.rs +++ b/lib/src/transaction.rs @@ -131,7 +131,7 @@ impl Transaction { let index = base_repo .index_store() - .write_index(mut_index, operation.id()) + .write_index(mut_index, &operation) .unwrap(); UnpublishedOperation::new(&base_repo.loader(), operation, view, index) }