@@ -28,14 +28,12 @@ async fn get_hadoop_catalog() -> HadoopCatalog {
2828 let cargo_manifest_dir = env ! ( "CARGO_MANIFEST_DIR" ) ;
2929 let test_data_path = format ! ( "file://{}/testdata/hadoop_warehouse" , cargo_manifest_dir) ;
3030 // let catalog = HadoopCatalog::new(test_data_path, file_io);
31- let catalog = HadoopCatalogBuilder :: default ( )
31+ HadoopCatalogBuilder :: default ( )
3232 . with_file_io ( file_io)
3333 . with_warehouse_root ( test_data_path)
3434 . build ( )
3535 . await
36- . expect ( "Should build HadoopCatalog" ) ;
37-
38- catalog
36+ . expect ( "Should build HadoopCatalog" )
3937}
4038
4139mod tests {
@@ -76,7 +74,7 @@ mod tests {
7674 // List tables in the nested namespace
7775 let mut tables = catalog
7876 . list_tables (
79- & iceberg:: NamespaceIdent :: from_strs ( & [ "nested" , "test" ] )
77+ & iceberg:: NamespaceIdent :: from_strs ( [ "nested" , "test" ] )
8078 . expect ( "Should create namespace" ) ,
8179 )
8280 . await
@@ -112,18 +110,18 @@ mod tests {
112110 namespaces
113111 ) ;
114112
115- namespaces. sort_by ( |a , b| a . to_string ( ) . cmp ( & b . to_string ( ) ) ) ;
113+ namespaces. sort_by_key ( |ns| ns . to_string ( ) ) ;
116114
117115 assert ! (
118116 namespaces[ 0 ] . to_string( ) == "nested" ,
119117 "The namespace should be 'nested', found: {}" ,
120- namespaces[ 0 ] . to_string ( )
118+ namespaces[ 0 ]
121119 ) ;
122120
123121 assert ! (
124122 namespaces[ 1 ] . to_string( ) == "test" ,
125123 "The namespace should be 'test', found: {}" ,
126- namespaces[ 1 ] . to_string ( )
124+ namespaces[ 1 ]
127125 ) ;
128126
129127 // List namespaces in the nested namespace
@@ -141,7 +139,7 @@ mod tests {
141139 assert ! (
142140 nested_namespaces[ 0 ] . to_string( ) == "nested.test" ,
143141 "The nested namespace should be 'nested.test', found: {}" ,
144- nested_namespaces[ 0 ] . to_string ( )
142+ nested_namespaces[ 0 ]
145143 ) ;
146144 }
147145
@@ -171,7 +169,7 @@ mod tests {
171169 // Check a nested namespace
172170 let nested_exists = catalog
173171 . namespace_exists (
174- & iceberg:: NamespaceIdent :: from_strs ( & [ "nested" , "test" ] )
172+ & iceberg:: NamespaceIdent :: from_strs ( [ "nested" , "test" ] )
175173 . expect ( "Should create nested namespace" ) ,
176174 )
177175 . await
@@ -198,7 +196,7 @@ mod tests {
198196 // Check if a nested table exists
199197 let exists = catalog
200198 . table_exists ( & iceberg:: TableIdent :: new (
201- iceberg:: NamespaceIdent :: from_strs ( & [ "nested" , "test" ] )
199+ iceberg:: NamespaceIdent :: from_strs ( [ "nested" , "test" ] )
202200 . expect ( "Should create nested namespace" ) ,
203201 "my_table_3" . to_string ( ) ,
204202 ) )
@@ -328,7 +326,7 @@ mod tests {
328326 {
329327 let table = catalog
330328 . load_table ( & iceberg:: TableIdent :: new (
331- iceberg:: NamespaceIdent :: from_strs ( & [ "nested" , "test" ] )
329+ iceberg:: NamespaceIdent :: from_strs ( [ "nested" , "test" ] )
332330 . expect ( "Should create nested namespace" ) ,
333331 "my_table_3" . to_string ( ) ,
334332 ) )
0 commit comments