File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -2154,4 +2154,23 @@ mod tests {
21542154 assert ! ( options. head) ;
21552155 assert_eq ! ( options. extensions. get:: <& str >( ) , extensions. get:: <& str >( ) ) ;
21562156 }
2157+
2158+ fn takes_generic_object_store < T : ObjectStoreExt > ( store : T ) {
2159+ // This function is just to ensure that the trait bounds are satisfied
2160+ let _ = store;
2161+ }
2162+ #[ test]
2163+ fn test_dyn_generic_impl ( ) {
2164+ let store: Arc < dyn ObjectStore > = Arc :: new ( memory:: InMemory :: new ( ) ) ;
2165+ takes_generic_object_store ( store) ;
2166+ let store: Box < dyn ObjectStore > = Box :: new ( memory:: InMemory :: new ( ) ) ;
2167+ takes_generic_object_store ( store) ;
2168+ }
2169+ #[ test]
2170+ fn test_generic_impl ( ) {
2171+ let store = Arc :: new ( memory:: InMemory :: new ( ) ) ;
2172+ takes_generic_object_store ( store) ;
2173+ let store = Box :: new ( memory:: InMemory :: new ( ) ) ;
2174+ takes_generic_object_store ( store) ;
2175+ }
21572176}
You can’t perform that action at this time.
0 commit comments