Nested use declarations

Viewed 27

What does the following syntax mean?

use tokio_tungstenite::{connect_async, tungstenite::protocol::Message};

Is it equivalent to this?

use tokio_tungstenite::connect_async;
use tokio_tungstenite::connect_async::tungstenite::protocol::Message;

I doubt it: tokio_tungstenite::connect_async::tungstenite::protocol::Message is not a symbol.

1 Answers

It is equivalent to:

use tokio_tungstenite::connect_async;
use tokio_tungstenite::tungstenite::protocol::Message;
Related