File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -432,13 +432,6 @@ pub(crate) fn parse_coerce_int96_string(
432432 }
433433}
434434
435- /// Allows easy conversion from ParquetSource to Arc<dyn FileSource>
436- impl From < ParquetSource > for Arc < dyn FileSource > {
437- fn from ( source : ParquetSource ) -> Self {
438- Arc :: new ( source)
439- }
440- }
441-
442435impl FileSource for ParquetSource {
443436 fn create_file_opener (
444437 & self ,
@@ -670,3 +663,10 @@ impl FileSource for ParquetSource {
670663 self . schema_adapter_factory . clone ( )
671664 }
672665}
666+
667+ /// Allows easy conversion from ParquetSource to Arc<dyn FileSource>
668+ impl From < ParquetSource > for Arc < dyn FileSource > {
669+ fn from ( source : ParquetSource ) -> Self {
670+ Arc :: new ( source)
671+ }
672+ }
Original file line number Diff line number Diff line change @@ -131,3 +131,10 @@ pub trait FileSource: Send + Sync {
131131 /// Returns the current schema adapter factory if set
132132 fn schema_adapter_factory ( & self ) -> Option < Arc < dyn SchemaAdapterFactory > > ;
133133}
134+
135+ /// Allows easy conversion from any type implementing FileSource to Arc<dyn FileSource>
136+ impl < T : FileSource + ' static > From < T > for Arc < dyn FileSource > {
137+ fn from ( source : T ) -> Self {
138+ Arc :: new ( source)
139+ }
140+ }
You can’t perform that action at this time.
0 commit comments