aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-06-10 11:01:02 -0400
committerCara Salter <cara@devcara.com>2022-06-10 11:01:02 -0400
commit26940cde1e363a5454ef0f06381c85afdd1c85d3 (patch)
treef8e5e152cdf16b7a663fda9a8b40d916c73e7275
parentec9855e3c22fd37c9a18d3eeb32c4a158bb71425 (diff)
downloadsolarlib-26940cde1e363a5454ef0f06381c85afdd1c85d3.tar.gz
solarlib-26940cde1e363a5454ef0f06381c85afdd1c85d3.zip
ship: Make download() sync
-rw-r--r--src/ship.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ship.rs b/src/ship.rs
index 43e660e..6466a5f 100644
--- a/src/ship.rs
+++ b/src/ship.rs
@@ -1,6 +1,6 @@
/*! A Ship is a star ship, or an installation ISO */
-use tokio::process::Command;
+use std::process::Command;
use std::process::{ExitStatus, Output};
use std::os::unix::process::ExitStatusExt;
use std::str::FromStr;
@@ -78,7 +78,7 @@ impl Ship {
}
}
- pub async fn download(&self, target: &Star) -> Result<(), Error> {
+ pub fn download(&self, target: &Star) -> Result<(), Error> {
let mut output: Output;
@@ -92,8 +92,7 @@ impl Ship {
&format!("/var/lib/libvirt/images/{}", self.make_pretty_name().clone()),
&self.download_url.clone(),
])
- .output()
- .await?;
+ .output()?;
} else {
output = Command::new("wget")
.args([
@@ -101,8 +100,7 @@ impl Ship {
&format!("/var/lib/libvirt/images/{}", self.make_pretty_name().clone()),
&self.download_url.clone(),
])
- .output()
- .await?;
+ .output()?;
}
if output.status != ExitStatus::from_raw(0) {