Skip to content

Commit 1f90b00

Browse files
authored
chore: improve variable naming conventions (#12042)
1 parent 186ba4c commit 1f90b00

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

datafusion-examples/examples/catalog.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ async fn main() -> Result<()> {
4646

4747
let ctx = SessionContext::new();
4848
let state = ctx.state();
49-
let catlist = Arc::new(CustomCatalogProviderList::new());
49+
let cataloglist = Arc::new(CustomCatalogProviderList::new());
5050

5151
// use our custom catalog list for context. each context has a single catalog list.
5252
// context will by default have [`MemoryCatalogProviderList`]
53-
ctx.register_catalog_list(catlist.clone());
53+
ctx.register_catalog_list(cataloglist.clone());
5454

5555
// initialize our catalog and schemas
5656
let catalog = DirCatalog::new();
@@ -81,7 +81,7 @@ async fn main() -> Result<()> {
8181
ctx.register_catalog("dircat", Arc::new(catalog));
8282
{
8383
// catalog was passed down into our custom catalog list since we override the ctx's default
84-
let catalogs = catlist.catalogs.read().unwrap();
84+
let catalogs = cataloglist.catalogs.read().unwrap();
8585
assert!(catalogs.contains_key("dircat"));
8686
};
8787

@@ -143,8 +143,8 @@ impl DirSchema {
143143
async fn create(state: &SessionState, opts: DirSchemaOpts<'_>) -> Result<Arc<Self>> {
144144
let DirSchemaOpts { ext, dir, format } = opts;
145145
let mut tables = HashMap::new();
146-
let listdir = std::fs::read_dir(dir).unwrap();
147-
for res in listdir {
146+
let direntries = std::fs::read_dir(dir).unwrap();
147+
for res in direntries {
148148
let entry = res.unwrap();
149149
let filename = entry.file_name().to_str().unwrap().to_string();
150150
if !filename.ends_with(ext) {

0 commit comments

Comments
 (0)