From 8a9a9e45b3d15aae943d95775ec111a465a101a1 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 31 Mar 2022 02:56:46 +0100 Subject: [PATCH] termprogress: Rename reporter() functions returning Box Signed-off-by: Ian Jackson --- cli/clisupport.rs | 4 ++-- src/termprogress.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/clisupport.rs b/cli/clisupport.rs index 71afb698..e405f632 100644 --- a/cli/clisupport.rs +++ b/cli/clisupport.rs @@ -107,9 +107,9 @@ impl MainOpts { #[throws(AE)] pub fn progressbar(&self) -> Box { if self.verbose >= 0 { - termprogress::new() + termprogress::reporter() } else { - termprogress::Null::new() + termprogress::Null::reporter() } } } diff --git a/src/termprogress.rs b/src/termprogress.rs index 6ef4291c..69a84f8d 100644 --- a/src/termprogress.rs +++ b/src/termprogress.rs @@ -16,7 +16,7 @@ pub trait Reporter { pub struct Null; impl Null { - pub fn new() -> Box { Box::new(Null) } + pub fn reporter() -> Box { Box::new(Null) } } #[allow(unused_variables)] @@ -25,7 +25,7 @@ impl Reporter for Null { fn clear(&mut self) { } } -pub fn new() -> Box { +pub fn reporter() -> Box { let term = console::Term::buffered_stderr(); let mut newlines = false; -- 2.30.2