Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: LFC <[email protected]>
  • Loading branch information
tisonkun and MichaelScofield authored Apr 26, 2024
1 parent f024ba5 commit 01e5741
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sql/src/statements/option_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl OptionMap {
}

pub fn to_str_map(&self) -> HashMap<&str, &str> {
let mut map = HashMap::new();
let mut map = HashMap::with_capacity(self.len());
map.extend(self.options.iter().map(|(k, v)| (k.as_str(), v.as_str())));
map.extend(
self.secrets
Expand All @@ -67,7 +67,8 @@ impl OptionMap {
}

pub fn into_map(self) -> HashMap<String, String> {
let mut map = self.options;
let mut map = HashMap::with_capacity(self.len());
map.extend(self.options);
map.extend(
self.secrets
.into_iter()
Expand Down

0 comments on commit 01e5741

Please sign in to comment.