delete type alias

This commit is contained in:
nora 2022-11-20 20:21:11 +01:00
parent 06f9546606
commit 206a6628ea
No known key found for this signature in database

View file

@ -5,12 +5,12 @@ const REQUEST_COUNT: usize = 10;
const CONCURRENT_REQUESTS: usize = 1_000; const CONCURRENT_REQUESTS: usize = 1_000;
#[tokio::main] #[tokio::main]
async fn main() -> Result<()> { async fn main() -> Result<(), Error> {
let client = reqwest::Client::builder() let client = reqwest::Client::builder()
.build() .build()
.unwrap(); .unwrap();
let urls = vec![String::from("http://example.com"); REQUEST_COUNT]; let urls = vec![String::from("http://example.com")];
// Concurrent Requests // Concurrent Requests
let bodies = stream::iter(urls) let bodies = stream::iter(urls)
@ -37,7 +37,4 @@ async fn main() -> Result<()> {
Ok(()) Ok(())
} }
#[derive(Debug)]
struct Error; struct Error;
type Result<T, E = Error> = ::core::result::Result<T, E>;