From: Ian Jackson Date: Thu, 31 Mar 2022 01:56:46 +0000 (+0100) Subject: termprogress: Rename reporter() functions returning Box X-Git-Tag: otter-1.0.0~38 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=8a9a9e45b3d15aae943d95775ec111a465a101a1;p=otter.git termprogress: Rename reporter() functions returning Box Signed-off-by: Ian Jackson --- 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;