I follow the akka-in-action tutorial, and chapter 2 has a class ( https://github.com/RayRoestenburg/akka-in-action/blob/master/chapter2/src/main/scala/com/goticks/RestInterface. scala ):
trait RestApi extends HttpService with ActorLogging { actor: Actor => import context.dispatcher import com.goticks.TicketProtocol._ ...
import context.dispatcher never used, but is defined with a comment:
implicit def dispatcher: ExecutionContextExecutor
However, IntelliJ continues to mark the import as "unused" and deletes it during "import optimization", causing a value pipeTo is not a member of scala.concurrent.Future[Any] error.
Is there a way to tell IntelliJ that this import is not intended to be used, but just to simply provide context?
Or should the tutorial be updated so as not to use such an βunused import"?
source share