Skip to content

Commit d18ca49

Browse files
committed
Reinstate warn(missing_docs) on client cli and fix most warnings
1 parent 12ab339 commit d18ca49

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

mithril-client-cli/src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1+
#![warn(missing_docs)]
2+
3+
//! A command line interface that uses the [Mithril Client Library](https://mithril.network/doc/manual/developer-docs/nodes/mithril-client-library)
4+
//! to manipulate Mithril certified types from a Mithril Aggregator:
5+
//! * Snapshots: List, Show, download and verify
6+
//! * Mithril Stake Distribution: List, download and verify
7+
//
8+
//! You can find more information on how it works reading the [documentation website](https://mithril.network/doc/mithril/mithril-network/client).
9+
110
pub mod configuration;
211
pub mod utils;

mithril-client-cli/src/utils/expander.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use anyhow::anyhow;
22
use futures::Future;
33
use mithril_common::StdResult;
44

5+
/// Utilities to expand aliases into their associated ids.
56
pub struct ExpanderUtils;
67

78
impl ExpanderUtils {

mithril-client-cli/src/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Utilities module
2-
//! This module contains tools needed mostly in services layers.
2+
//! This module contains tools needed for the commands layer.
33
44
mod expander;
55
mod feedback_receiver;

mithril-client-cli/src/utils/progress_reporter.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,11 @@ impl Deref for ProgressPrinter {
7272
}
7373
}
7474

75+
/// Utility to format a [ProgressBar] status as json
7576
pub struct ProgressBarJsonFormatter;
7677

7778
impl ProgressBarJsonFormatter {
79+
/// Get a json formatted string given the progress bar status
7880
pub fn format(progress_bar: &ProgressBar) -> String {
7981
format!(
8082
r#"{{"timestamp": "{}", "bytes_downloaded": {}, "bytes_total": {}, "seconds_left": {}.{:0>3}, "seconds_elapsed": {}.{:0>3}}}"#,
@@ -97,7 +99,7 @@ pub struct DownloadProgressReporter {
9799
}
98100

99101
impl DownloadProgressReporter {
100-
/// Instanciate a new progress reporter
102+
/// Instantiate a new progress reporter
101103
pub fn new(progress_bar: ProgressBar, output_type: ProgressOutputType) -> Self {
102104
Self {
103105
progress_bar,
@@ -129,6 +131,7 @@ impl DownloadProgressReporter {
129131
};
130132
}
131133

134+
/// Report that the current download is finished and print the given message.
132135
pub fn finish(&self, message: &str) {
133136
self.progress_bar.finish_with_message(message.to_string());
134137
}

0 commit comments

Comments
 (0)