diff --git a/lib/src/op_heads_store.rs b/lib/src/op_heads_store.rs index 78dfcf5b7..a2fa0a682 100644 --- a/lib/src/op_heads_store.rs +++ b/lib/src/op_heads_store.rs @@ -23,7 +23,6 @@ use crate::backend::Timestamp; use crate::lock::FileLock; use crate::op_store::{OpStore, OperationId, OperationMetadata}; use crate::operation::Operation; -use crate::repo::RepoLoader; use crate::{dag_walk, op_store}; /// Manages the very set of current heads of the operation log. The store is @@ -124,7 +123,7 @@ impl OpHeadsStore { pub fn get_heads( self: &Arc, - repo_loader: &RepoLoader, + op_store: &Arc, ) -> Result { let mut op_heads = self.get_op_heads(); @@ -132,8 +131,6 @@ impl OpHeadsStore { return Err(OpHeadResolutionError::NoHeads); } - let op_store = repo_loader.op_store(); - if op_heads.len() == 1 { let operation_id = op_heads.pop().unwrap(); let operation = op_store.read_operation(&operation_id).unwrap(); diff --git a/lib/src/repo.rs b/lib/src/repo.rs index 5813983c7..2b098c1c4 100644 --- a/lib/src/repo.rs +++ b/lib/src/repo.rs @@ -373,7 +373,7 @@ impl RepoLoader { } pub fn load_at_head(&self) -> RepoAtHead { - let op_heads = self.op_heads_store.get_heads(self).unwrap(); + let op_heads = self.op_heads_store.get_heads(&self.op_store).unwrap(); match op_heads { OpHeads::Single(op) => { let view = View::new(op.view().take_store_view());