How to migrate tokio from 0.1 to 0.2

use tokio::runtime::TaskExecutor;

unresolved import tokio::runtime::TaskExecutor

The v0.2 equivalent of TaskExecutor is called Handle.

use tokio::runtime::Handle;

rt.shutdown_on_idle();

now we don't need to shutdown it manually?

The runtime is shut down when it is dropped.

do we need to manually call drop function?

The runtime is dropped when it goes out of scope.

that's great , thank you!