summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-06-18 08:42:46 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2021-06-18 08:42:47 +0200
commitb140c12b53931bf463f706d28ddb3be0c0fb0e4f (patch)
tree6965d6b3ea77b553fdd645426e17b4c6f3dad06b
parentf20bf09292739e1bdbba9c1f8235a35f7d2d7712 (diff)
Remove progressbar for tree-of subcommand
Remove the progress bar here because it does not bring any real value and rather clutters the output and thus makes it harder to read. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r--src/commands/tree_of.rs9
-rw-r--r--src/main.rs2
2 files changed, 2 insertions, 9 deletions
diff --git a/src/commands/tree_of.rs b/src/commands/tree_of.rs
index a2ae0c5..b816d24 100644
--- a/src/commands/tree_of.rs
+++ b/src/commands/tree_of.rs
@@ -21,13 +21,11 @@ use crate::package::PackageName;
use crate::package::PackageVersionConstraint;
use crate::package::Dag;
use crate::repository::Repository;
-use crate::util::progress::ProgressBars;
/// Implementation of the "tree_of" subcommand
pub async fn tree_of(
matches: &ArgMatches,
repo: Repository,
- progressbars: ProgressBars,
) -> Result<()> {
let pname = matches
.value_of("package_name")
@@ -46,12 +44,7 @@ pub async fn tree_of(
.map(|v| v.matches(p.version()))
.unwrap_or(true)
})
- .map(|package| {
- let bar_tree_building = progressbars.bar();
- let tree = Dag::for_root_package(package.clone(), &repo, Some(&bar_tree_building))?;
- bar_tree_building.finish_with_message("Finished loading Tree");
- Ok(tree)
- })
+ .map(|package| Dag::for_root_package(package.clone(), &repo, None))
.and_then_ok(|tree| {
let stdout = std::io::stdout();
let mut outlock = stdout.lock();
diff --git a/src/main.rs b/src/main.rs
index 59dd559..5ae443b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -234,7 +234,7 @@ async fn main() -> Result<()> {
Some(("tree-of", matches)) => {
let repo = load_repo()?;
- crate::commands::tree_of(matches, repo, progressbars)
+ crate::commands::tree_of(matches, repo)
.await
.context("tree-of command failed")?
}