@@ -58,20 +58,12 @@ fn create_data_dir() -> Result<tempfile::TempDir, crate::store::Error> {
5858 Ok ( tempfile:: Builder :: new ( ) . prefix ( "rerun-data-" ) . tempdir ( ) ?)
5959}
6060
61+ #[ derive( Default ) ]
6162pub struct RerunCloudHandlerBuilder {
6263 settings : RerunCloudHandlerSettings ,
6364 store : InMemoryStore ,
6465}
6566
66- impl Default for RerunCloudHandlerBuilder {
67- fn default ( ) -> Self {
68- Self {
69- settings : Default :: default ( ) ,
70- store : InMemoryStore :: default ( ) ,
71- }
72- }
73- }
74-
7567impl RerunCloudHandlerBuilder {
7668 pub fn new ( ) -> Self {
7769 Self :: default ( )
@@ -1500,25 +1492,24 @@ impl RerunCloudService for RerunCloudHandler {
15001492
15011493 let schema = Arc :: new ( request. schema ) ;
15021494
1503- let details = match request. provider_details {
1504- Some ( details) => details,
1505- None => {
1506- // Create a directory in the storage directory. We use a tuid to avoid collisions
1507- // and avoid any sanitization issue with the provided table name.
1508- let table_path = self
1509- . settings
1510- . storage_dir
1511- . path ( )
1512- . join ( format ! ( "lance-{}" , Tuid :: new( ) . to_string( ) ) ) ;
1513- ProviderDetails :: LanceTable ( LanceTable {
1514- table_url : url:: Url :: from_directory_path ( table_path) . map_err ( |_| {
1515- Status :: internal ( format ! (
1516- "Failed to create table directory in {:?}" ,
1517- self . settings. storage_dir. path( )
1518- ) )
1519- } ) ?,
1520- } )
1521- }
1495+ let details = if let Some ( details) = request. provider_details {
1496+ details
1497+ } else {
1498+ // Create a directory in the storage directory. We use a tuid to avoid collisions
1499+ // and avoid any sanitization issue with the provided table name.
1500+ let table_path = self
1501+ . settings
1502+ . storage_dir
1503+ . path ( )
1504+ . join ( format ! ( "lance-{}" , Tuid :: new( ) ) ) ;
1505+ ProviderDetails :: LanceTable ( LanceTable {
1506+ table_url : url:: Url :: from_directory_path ( table_path) . map_err ( |err| {
1507+ Status :: internal ( format ! (
1508+ "Failed to create table directory in {:?} (err: {err:?})" ,
1509+ self . settings. storage_dir. path( )
1510+ ) )
1511+ } ) ?,
1512+ } )
15221513 } ;
15231514
15241515 let table = match details {
0 commit comments