aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/cli
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-11-02 15:31:38 +0000
committerAleksey Kladov <[email protected]>2020-11-02 15:58:33 +0000
commitba8d6d1e4ea2590b31470171efc175b0301c5e1c (patch)
tree6304a61e803e5adf802abce8ae2d7066a2c5fef8 /crates/rust-analyzer/src/cli
parent731b38fa3c1694648e6c8e60f61820f9783343eb (diff)
Remove more unreachable pubs
Diffstat (limited to 'crates/rust-analyzer/src/cli')
-rw-r--r--crates/rust-analyzer/src/cli/progress_report.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/rust-analyzer/src/cli/progress_report.rs b/crates/rust-analyzer/src/cli/progress_report.rs
index 31867a1e9..bdbe565e6 100644
--- a/crates/rust-analyzer/src/cli/progress_report.rs
+++ b/crates/rust-analyzer/src/cli/progress_report.rs
@@ -4,7 +4,7 @@
4use std::io::Write; 4use std::io::Write;
5 5
6/// A Simple ASCII Progress Bar 6/// A Simple ASCII Progress Bar
7pub struct ProgressReport { 7pub(crate) struct ProgressReport {
8 curr: f32, 8 curr: f32,
9 text: String, 9 text: String,
10 hidden: bool, 10 hidden: bool,
@@ -15,7 +15,7 @@ pub struct ProgressReport {
15} 15}
16 16
17impl ProgressReport { 17impl ProgressReport {
18 pub fn new(len: u64) -> ProgressReport { 18 pub(crate) fn new(len: u64) -> ProgressReport {
19 ProgressReport { 19 ProgressReport {
20 curr: 0.0, 20 curr: 0.0,
21 text: String::new(), 21 text: String::new(),
@@ -26,7 +26,7 @@ impl ProgressReport {
26 } 26 }
27 } 27 }
28 28
29 pub fn hidden() -> ProgressReport { 29 pub(crate) fn hidden() -> ProgressReport {
30 ProgressReport { 30 ProgressReport {
31 curr: 0.0, 31 curr: 0.0,
32 text: String::new(), 32 text: String::new(),
@@ -37,18 +37,18 @@ impl ProgressReport {
37 } 37 }
38 } 38 }
39 39
40 pub fn set_message(&mut self, msg: &str) { 40 pub(crate) fn set_message(&mut self, msg: &str) {
41 self.msg = msg.to_string(); 41 self.msg = msg.to_string();
42 self.tick(); 42 self.tick();
43 } 43 }
44 44
45 pub fn println<I: Into<String>>(&mut self, msg: I) { 45 pub(crate) fn println<I: Into<String>>(&mut self, msg: I) {
46 self.clear(); 46 self.clear();
47 println!("{}", msg.into()); 47 println!("{}", msg.into());
48 self.tick(); 48 self.tick();
49 } 49 }
50 50
51 pub fn inc(&mut self, delta: u64) { 51 pub(crate) fn inc(&mut self, delta: u64) {
52 self.pos += delta; 52 self.pos += delta;
53 if self.len == 0 { 53 if self.len == 0 {
54 self.set_value(0.0) 54 self.set_value(0.0)
@@ -58,11 +58,11 @@ impl ProgressReport {
58 self.tick(); 58 self.tick();
59 } 59 }
60 60
61 pub fn finish_and_clear(&mut self) { 61 pub(crate) fn finish_and_clear(&mut self) {
62 self.clear(); 62 self.clear();
63 } 63 }
64 64
65 pub fn tick(&mut self) { 65 pub(crate) fn tick(&mut self) {
66 if self.hidden { 66 if self.hidden {
67 return; 67 return;
68 } 68 }