Skip to content

Commit

Permalink
fix: minor bugs/comments
Browse files Browse the repository at this point in the history
  • Loading branch information
royalpinto007 committed Dec 30, 2023
1 parent a14cc48 commit e1c4440
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
8 changes: 2 additions & 6 deletions coffee_cmd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ async fn main() -> Result<(), CoffeeError> {
};
match coffee.upgrade(&repo, verbose).await {
Ok(res) => {
if let Some(spinner) = spinner {
spinner.finish();
}
spinner.and_then(|splinner| Some(splinner.finish()));
match res.status {
UpgradeStatus::UpToDate => {
term::info!("Remote repository `{}` is already up to date!", res.repo)
Expand All @@ -81,9 +79,7 @@ async fn main() -> Result<(), CoffeeError> {
}
}
Err(err) => {
if let Some(spinner) = spinner {
spinner.failed();
}
spinner.and_then(|spinner| Some(spinner.failed()));
return Err(err);
}
}
Expand Down
1 change: 0 additions & 1 deletion coffee_core/src/coffee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ impl PluginManager for CoffeeManager {
let status = repository.upgrade(&self.config.plugins).await?;
for plugins in status.plugins_effected.iter() {
self.remove(plugins).await?;
// FIXME: pass the verbose flag to the upgrade command
self.install(plugins, verbose, false).await?;
}
self.flush().await?;
Expand Down
2 changes: 1 addition & 1 deletion coffee_lib/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl Plugin {
}

/// upgrade the plugin to a new version.
pub async fn upgrade(&mut self, verbose: bool) -> Result<(), CoffeeError> {
pub async fn upgrade(&mut self, _: bool) -> Result<(), CoffeeError> {
todo!("not implemented yet")
}

Expand Down

0 comments on commit e1c4440

Please sign in to comment.