Skip to content

Commit

Permalink
Accept &str and String
Browse files Browse the repository at this point in the history
  • Loading branch information
mlafeldt committed Nov 23, 2023
1 parent cef3f86 commit 6a4eca0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ impl Config {

/// Add any setting to the config. DuckDB will return an error if the setting is unknown or
/// otherwise invalid.
pub fn with(mut self, key: &str, value: &str) -> Result<Config> {
self.set(key, value)?;
pub fn with(mut self, key: impl AsRef<str>, value: impl AsRef<str>) -> Result<Config> {
self.set(key.as_ref(), value.as_ref())?;
Ok(self)
}

Expand Down

0 comments on commit 6a4eca0

Please sign in to comment.