Skip to content

Commit

Permalink
refactor(dag): update some multi-parameter function argument names
Browse files Browse the repository at this point in the history
  • Loading branch information
arxanas committed Feb 11, 2024
1 parent f2fbd47 commit 3a1c03f
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions git-branchless-lib/src/core/dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,13 @@ impl Dag {

/// Wrapper around DAG method.
#[instrument]
pub fn query_is_ancestor(&self, lhs: NonZeroOid, rhs: NonZeroOid) -> eden_dag::Result<bool> {
let result = self.run_blocking(self.inner.is_ancestor(lhs.into(), rhs.into()))?;
pub fn query_is_ancestor(
&self,
ancestor: NonZeroOid,
descendant: NonZeroOid,
) -> eden_dag::Result<bool> {
let result =
self.run_blocking(self.inner.is_ancestor(ancestor.into(), descendant.into()))?;
Ok(result)
}

Expand Down Expand Up @@ -630,15 +635,19 @@ impl Dag {

/// Wrapper around DAG method.
#[instrument]
pub fn query_only(&self, from: CommitSet, to: CommitSet) -> eden_dag::Result<CommitSet> {
let result = self.run_blocking(self.inner.only(from, to))?;
pub fn query_only(
&self,
reachable: CommitSet,
unreachable: CommitSet,
) -> eden_dag::Result<CommitSet> {
let result = self.run_blocking(self.inner.only(reachable, unreachable))?;
Ok(result)
}

/// Wrapper around DAG method.
#[instrument]
pub fn query_range(&self, from: CommitSet, to: CommitSet) -> eden_dag::Result<CommitSet> {
let result = self.run_blocking(self.inner.range(from, to))?;
pub fn query_range(&self, roots: CommitSet, heads: CommitSet) -> eden_dag::Result<CommitSet> {
let result = self.run_blocking(self.inner.range(roots, heads))?;
Ok(result)
}

Expand Down

0 comments on commit 3a1c03f

Please sign in to comment.