refactor: use Self in branch method return types

This commit is contained in:
Brendan Clement
2026-06-02 17:39:55 -07:00
parent 2ca6d41f17
commit c3c2887c02

View File

@@ -1645,7 +1645,7 @@ impl Table {
&self,
name: &str,
from: impl Into<lance::dataset::refs::Ref>,
) -> Result<Table> {
) -> Result<Self> {
let inner = self.inner.create_branch(name, from.into()).await?;
Ok(Self {
inner,
@@ -1655,7 +1655,7 @@ impl Table {
}
/// Check out an existing branch and return a handle scoped to it.
pub async fn checkout_branch(&self, name: &str) -> Result<Table> {
pub async fn checkout_branch(&self, name: &str) -> Result<Self> {
let inner = self.inner.checkout_branch(name).await?;
Ok(Self {
inner,