@@ -18,16 +18,15 @@ package freestyle.cassandra
1818
1919import cats .{~> , MonadError }
2020import com .datastax .driver .core .{Cluster , Session }
21- import com .google .common .util .concurrent .{AsyncFunction , Futures , ListenableFuture }
2221import freestyle .async .AsyncContext
23- import freestyle .asyncGuava .implicits ._
22+ import freestyle .async .{Implicits => AsyncImplicits }
23+ import freestyle .asyncGuava .AsyncGuavaImplicits
2424import freestyle .cassandra .api ._
2525import freestyle .cassandra .handlers ._
26- import java .util .concurrent .{Executor => JavaExecutor }
2726
2827import scala .concurrent .ExecutionContext
2928
30- object implicits {
29+ trait CassandraImplicits extends AsyncImplicits with AsyncGuavaImplicits {
3130
3231 implicit def clusterAPIInterpreter [M [_]](
3332 implicit cluster : Cluster ,
@@ -50,18 +49,6 @@ object implicits {
5049 implicit def resultSetAPIHandler [M [_]](
5150 implicit ME : MonadError [M , Throwable ]): ResultSetAPIHandler [M ] =
5251 new ResultSetAPIHandler [M ]
53-
54- implicit def listenableVoidToListenableUnit (future : ListenableFuture [Void ])(
55- implicit E : ExecutionContext ): ListenableFuture [Unit ] =
56- Futures .transformAsync(
57- future,
58- new AsyncFunction [Void , Unit ] {
59- override def apply (input : Void ): ListenableFuture [Unit ] =
60- Futures .immediateFuture((): Unit )
61- },
62- new JavaExecutor {
63- override def execute (command : Runnable ): Unit = E .execute(command)
64- }
65- )
66-
6752}
53+
54+ object implicits extends CassandraImplicits
0 commit comments