Skip to content

Commit

Permalink
fix(cargo-shuttle): cargo shuttle clean response type (#1409)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaro00 committed Nov 21, 2023
1 parent 569e831 commit 9b1ef53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cargo-shuttle/src/client.rs
Expand Up @@ -140,7 +140,7 @@ impl Client {
.await
}

pub async fn clean_project(&self, project: &str) -> Result<Vec<String>> {
pub async fn clean_project(&self, project: &str) -> Result<String> {
let path = format!("/projects/{project}/clean");

self.post(path, Option::<String>::None)
Expand Down
9 changes: 2 additions & 7 deletions cargo-shuttle/src/lib.rs
Expand Up @@ -635,7 +635,7 @@ impl Shuttle {

async fn clean(&self) -> Result<CommandOutcome> {
let client = self.client.as_ref().unwrap();
let lines = client
let message = client
.clean_project(self.ctx.project_name())
.await
.map_err(|err| {
Expand All @@ -646,12 +646,7 @@ impl Shuttle {
"cleaning your project or checking its status fail repeatedly",
)
})?;

for line in lines {
println!("{line}");
}

println!("Cleaning done!");
println!("{message}");

Ok(CommandOutcome::Ok)
}
Expand Down

0 comments on commit 9b1ef53

Please sign in to comment.