我们可以让模块不再平铺在目录里面,把他移入文件文件夹中。 src ├── front_of_house │ └── hosting.rs ├── front_of_house.rs └── lib.rs //lib.rs mod front_of_house;//导入当前目录下的front_of
// main.rs use futures::future::join_all; use reqwest::Client; use std::sync::Arc; use tokio::sync::Semaphore; use tokio::task; // 引入join_all #[tokio