mirror of
https://github.com/mmvanheusden/SteamDepotDownloaderGUI.git
synced 2026-02-04 05:31:19 +01:00
refactor: no need for manually handling an issue with response content twice
This commit is contained in:
@@ -41,10 +41,7 @@ pub async fn download_file(url: &str, filename: &Path) -> io::Result<()> {
|
||||
.await
|
||||
.expect("Failed to contact internet.");
|
||||
|
||||
let content = response
|
||||
.bytes()
|
||||
.await
|
||||
.expect("Failed to get response content.");
|
||||
let content = response.bytes().await.unwrap();
|
||||
|
||||
file.write_all(&content)?;
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user