diff --git a/iroh/src/client/blobs/batch.rs b/iroh/src/client/blobs/batch.rs index 5a0eb0086e0..eb8df9938c5 100644 --- a/iroh/src/client/blobs/batch.rs +++ b/iroh/src/client/blobs/batch.rs @@ -410,7 +410,7 @@ impl Batch { } /// Upgrade a temp tag to a persistent tag. - pub async fn upgrade(&self, tt: TempTag) -> Result { + pub async fn persist(&self, tt: TempTag) -> Result { let tag = self .0 .rpc @@ -424,7 +424,7 @@ impl Batch { } /// Upgrade a temp tag to a persistent tag with a specific name. - pub async fn upgrade_to(&self, tt: TempTag, tag: Tag) -> Result<()> { + pub async fn persist_to(&self, tt: TempTag, tag: Tag) -> Result<()> { self.0 .rpc .rpc(tags::SetRequest { @@ -441,9 +441,9 @@ impl Batch { /// an automatically generated name. pub async fn upgrade_with_opts(&self, tt: TempTag, opts: SetTagOption) -> Result { match opts { - SetTagOption::Auto => self.upgrade(tt).await, + SetTagOption::Auto => self.persist(tt).await, SetTagOption::Named(tag) => { - self.upgrade_to(tt, tag.clone()).await?; + self.persist_to(tt, tag.clone()).await?; Ok(tag) } } diff --git a/iroh/tests/batch.rs b/iroh/tests/batch.rs index aaf9fbe5423..8b852b03c78 100644 --- a/iroh/tests/batch.rs +++ b/iroh/tests/batch.rs @@ -234,6 +234,6 @@ async fn wrong_batch() -> anyhow::Result<()> { let tag = batch.add_bytes(data).await?; drop(batch); let batch = client.batch().await?; - assert!(batch.upgrade(tag).await.is_err()); + assert!(batch.persist(tag).await.is_err()); Ok(()) }