diff --git a/hello-async/src/main.rs b/hello-async/src/main.rs index 65a171b..6bc2e81 100644 --- a/hello-async/src/main.rs +++ b/hello-async/src/main.rs @@ -5,8 +5,7 @@ fn main() { } async fn page_title(url: &str) -> Option<String> { - let response = trpl::get(url).await; - let response_text = response.text().await; + let response_text = trpl::get(url).await.text().await; Html::parse(&response_text) .select_first("title") .map(|title_element| title_element.inner_html())