Skip to content

Commit

Permalink
style: Uses keys method when getting schema and table names (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
scsmithr authored Sep 15, 2022
1 parent e3d5875 commit 07a8868
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/sqlexec/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl CatalogProvider for DatabaseCatalog {

fn schema_names(&self) -> Vec<String> {
let schemas = self.schemas.read();
schemas.iter().map(|(name, _)| name).cloned().collect()
schemas.keys().cloned().collect()
}

fn schema(&self, name: &str) -> Option<Arc<dyn SchemaProvider>> {
Expand Down Expand Up @@ -142,7 +142,7 @@ impl SchemaProvider for SchemaCatalog {

fn table_names(&self) -> Vec<String> {
let tables = self.tables.read();
tables.iter().map(|(name, _)| name).cloned().collect()
tables.keys().cloned().collect()
}

fn register_table(
Expand Down

0 comments on commit 07a8868

Please sign in to comment.