Skip to content

Commit

Permalink
Remove deprecated try_with_option methods (#5237)
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold authored Dec 23, 2023
1 parent c6f8bb5 commit a9d219b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 61 deletions.
23 changes: 0 additions & 23 deletions object_store/src/aws/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,29 +477,6 @@ impl AmazonS3Builder {
self
}

/// Set an option on the builder via a key - value pair.
///
/// This method will return an `UnknownConfigKey` error if key cannot be parsed into [`AmazonS3ConfigKey`].
#[deprecated(note = "Use with_config")]
pub fn try_with_option(self, key: impl AsRef<str>, value: impl Into<String>) -> Result<Self> {
Ok(self.with_config(key.as_ref().parse()?, value))
}

/// Hydrate builder from key value pairs
///
/// This method will return an `UnknownConfigKey` error if any key cannot be parsed into [`AmazonS3ConfigKey`].
#[deprecated(note = "Use with_config")]
#[allow(deprecated)]
pub fn try_with_options<I: IntoIterator<Item = (impl AsRef<str>, impl Into<String>)>>(
mut self,
options: I,
) -> Result<Self> {
for (key, value) in options {
self = self.try_with_option(key, value)?;
}
Ok(self)
}

/// Get config value via a [`AmazonS3ConfigKey`].
///
/// # Example
Expand Down
19 changes: 0 additions & 19 deletions object_store/src/azure/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,25 +521,6 @@ impl MicrosoftAzureBuilder {
self
}

/// Set an option on the builder via a key - value pair.
#[deprecated(note = "Use with_config")]
pub fn try_with_option(self, key: impl AsRef<str>, value: impl Into<String>) -> Result<Self> {
Ok(self.with_config(key.as_ref().parse()?, value))
}

/// Hydrate builder from key value pairs
#[deprecated(note = "Use with_config")]
#[allow(deprecated)]
pub fn try_with_options<I: IntoIterator<Item = (impl AsRef<str>, impl Into<String>)>>(
mut self,
options: I,
) -> Result<Self> {
for (key, value) in options {
self = self.try_with_option(key, value)?;
}
Ok(self)
}

/// Get config value via a [`AzureConfigKey`].
///
/// # Example
Expand Down
19 changes: 0 additions & 19 deletions object_store/src/gcp/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,25 +287,6 @@ impl GoogleCloudStorageBuilder {
self
}

/// Set an option on the builder via a key - value pair.
#[deprecated(note = "Use with_config")]
pub fn try_with_option(self, key: impl AsRef<str>, value: impl Into<String>) -> Result<Self> {
Ok(self.with_config(key.as_ref().parse()?, value))
}

/// Hydrate builder from key value pairs
#[deprecated(note = "Use with_config")]
#[allow(deprecated)]
pub fn try_with_options<I: IntoIterator<Item = (impl AsRef<str>, impl Into<String>)>>(
mut self,
options: I,
) -> Result<Self> {
for (key, value) in options {
self = self.try_with_option(key, value)?;
}
Ok(self)
}

/// Get config value via a [`GoogleConfigKey`].
///
/// # Example
Expand Down

0 comments on commit a9d219b

Please sign in to comment.