diff --git a/async-nats/src/jetstream/kv/mod.rs b/async-nats/src/jetstream/kv/mod.rs index 1a58444b6..51b5b024f 100644 --- a/async-nats/src/jetstream/kv/mod.rs +++ b/async-nats/src/jetstream/kv/mod.rs @@ -739,7 +739,7 @@ impl Store { /// # } /// ``` pub async fn purge>(&self, key: T) -> Result<(), PurgeError> { - self.purge_expected_revision(key, None).await + self.purge_expect_revision(key, None).await } /// Purges all the revisions of a entry destructively if the resision matches, leaving behind a single @@ -762,11 +762,11 @@ impl Store { /// .await?; /// kv.put("key", "value".into()).await?; /// let revision = kv.put("key", "another".into()).await?; - /// kv.purge_expected_revision("key", Some(revision)).await?; + /// kv.purge_expect_revision("key", Some(revision)).await?; /// # Ok(()) /// # } /// ``` - pub async fn purge_expected_revision>( + pub async fn purge_expect_revision>( &self, key: T, revison: Option, diff --git a/async-nats/tests/kv_tests.rs b/async-nats/tests/kv_tests.rs index c20d55754..d1e8688c2 100644 --- a/async-nats/tests/kv_tests.rs +++ b/async-nats/tests/kv_tests.rs @@ -373,12 +373,12 @@ mod kv { let wrong_revision = 3; let failed = kv - .purge_expected_revision("dz", Some(wrong_revision)) + .purge_expect_revision("dz", Some(wrong_revision)) .await .is_err(); assert!(failed); - kv.purge_expected_revision("dz", Some(revision)) + kv.purge_expect_revision("dz", Some(revision)) .await .unwrap(); let history = kv.history("dz").await.unwrap().count().await;