Skip to content

Commit

Permalink
Don't mess with existing interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jcdyer committed Jul 26, 2024
1 parent d9632c9 commit 45bc3fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/manage/keys/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Options {
/// ```
/// use deepgram::manage::keys::options::Options;
/// let options = Options::builder("API Key", ["member"])
/// .tags(["my-tag", "another-tag"])
/// .tag(["my-tag", "another-tag"])
/// .build();
/// assert_eq!(
/// &options.json().unwrap(),
Expand Down Expand Up @@ -120,25 +120,25 @@ impl OptionsBuilder {
/// # use deepgram::manage::keys::options::Options;
/// #
/// let options = Options::builder("New Key", ["member"])
/// .tags(["Tag 1", "Tag 2"])
/// .tag(["Tag 1", "Tag 2"])
/// .build();
/// ```
///
/// ```
/// # use deepgram::manage::keys::options::Options;
/// #
/// let options1 = Options::builder("New Key", ["member"])
/// .tags(["Tag 1"])
/// .tags(vec!["Tag 2"])
/// .tag(["Tag 1"])
/// .tag(vec!["Tag 2"])
/// .build();
///
/// let options2 = Options::builder("New Key", ["member"])
/// .tags(["Tag 1", "Tag 2"])
/// .tag(["Tag 1", "Tag 2"])
/// .build();
///
/// assert_eq!(options1, options2);
/// ```
pub fn tags<'a>(mut self, tags: impl IntoIterator<Item = &'a str>) -> Self {
pub fn tag<'a>(mut self, tags: impl IntoIterator<Item = &'a str>) -> Self {
self.0.tags.extend(tags.into_iter().map(String::from));
self
}
Expand Down

0 comments on commit 45bc3fa

Please sign in to comment.