Skip to content

Commit

Permalink
Adjust wording on function doc
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenperera committed Feb 2, 2024
1 parent aa6bb54 commit 7108418
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions async-nats/src/jetstream/kv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@ impl Store {
})
}

/// Creates new key value pair into the bucket.
/// If the key already exists, it will return an error.
/// Create will add the key/value pair if it does not exist. If it does exist, it will return an error.
///
/// # Examples
///
Expand All @@ -226,7 +225,9 @@ impl Store {
/// ..Default::default()
/// })
/// .await?;
/// let status = kv.create("key", "value".into()).await?;
///
/// let status = kv.create("key", "value".into()).await?;a
/// assert!(status.is_ok());
///
/// let status = kv.create("key", "value".into()).await;
/// assert!(status.is_err());
Expand Down

0 comments on commit 7108418

Please sign in to comment.