I\'m following the mdns Rust documentation and pasted the example code but it throws the following error:
thread \'ma
You are using a newer version of Tokio, such as 0.3 or 1.0 and many packages, including mdns 1.1.0, rely on an older version of Tokio, such as 0.2.
% cargo tree -d
tokio v0.2.22
└── mdns v1.1.0
└── example_project v0.1.0
tokio v0.3.3
└── example_project v0.1.0
For now, you will need to match versions of the Tokio runtime. The easiest way is to use Tokio 0.2 yourself. The tokio-compat-02 crate may also be useful in some cases.
See also:
Various error messages with the same root cause:
there is no reactor running, must be called from the context of Tokio runtime
not currently running on the Tokio runtime