Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated try_with_option methods #5237

Merged
merged 1 commit into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -289,25 +289,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
Loading