Skip to content

Commit bdcc4a8

Browse files
committed
Move client cli commands module declaration to its lib.rs
Reverting a change that was made when we worked on the first client library version to remove the lib api the code only needed by the binary.
1 parent d18ca49 commit bdcc4a8

File tree

7 files changed

+12
-13
lines changed

7 files changed

+12
-13
lines changed

mithril-client-cli/src/commands/mithril_stake_distribution/download.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use std::{
88
sync::Arc,
99
};
1010

11+
use crate::{configuration::ConfigParameters, utils::ExpanderUtils};
1112
use mithril_client::{ClientBuilder, MessageBuilder};
12-
use mithril_client_cli::{configuration::ConfigParameters, utils::ExpanderUtils};
1313
use mithril_common::StdResult;
1414

1515
/// Download and verify a Mithril Stake Distribution information. If the

mithril-client-cli/src/commands/mithril_stake_distribution/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use config::{builder::DefaultState, ConfigBuilder};
44
use slog_scope::logger;
55
use std::{collections::HashMap, sync::Arc};
66

7+
use crate::configuration::ConfigParameters;
78
use mithril_client::ClientBuilder;
8-
use mithril_client_cli::configuration::ConfigParameters;
99
use mithril_common::{test_utils::fake_keys, StdResult};
1010

1111
/// Mithril stake distribution LIST command

mithril-client-cli/src/commands/snapshot/download.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ use std::{
1010
sync::Arc,
1111
};
1212

13-
use mithril_client::{
14-
common::ProtocolMessage, Client, ClientBuilder, MessageBuilder, MithrilCertificate, Snapshot,
15-
};
16-
use mithril_client_cli::{
13+
use crate::{
1714
configuration::ConfigParameters,
1815
utils::{
1916
ExpanderUtils, IndicatifFeedbackReceiver, ProgressOutputType, ProgressPrinter,
2017
SnapshotUnpacker, SnapshotUtils,
2118
},
2219
};
20+
use mithril_client::{
21+
common::ProtocolMessage, Client, ClientBuilder, MessageBuilder, MithrilCertificate, Snapshot,
22+
};
2323
use mithril_common::StdResult;
2424

2525
/// Clap command to download the snapshot and verify the certificate.

mithril-client-cli/src/commands/snapshot/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use config::{builder::DefaultState, ConfigBuilder};
44
use slog_scope::logger;
55
use std::{collections::HashMap, sync::Arc};
66

7+
use crate::configuration::ConfigParameters;
78
use mithril_client::ClientBuilder;
8-
use mithril_client_cli::configuration::ConfigParameters;
99
use mithril_common::{test_utils::fake_keys, StdResult};
1010

1111
/// Clap command to list existing snapshots

mithril-client-cli/src/commands/snapshot/show.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use config::{builder::DefaultState, ConfigBuilder};
55
use slog_scope::logger;
66
use std::{collections::HashMap, sync::Arc};
77

8+
use crate::{configuration::ConfigParameters, utils::ExpanderUtils};
89
use mithril_client::ClientBuilder;
9-
use mithril_client_cli::{configuration::ConfigParameters, utils::ExpanderUtils};
1010
use mithril_common::{test_utils::fake_keys, StdResult};
1111

1212
/// Clap command to show a given snapshot

mithril-client-cli/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
//
88
//! You can find more information on how it works reading the [documentation website](https://mithril.network/doc/mithril/mithril-network/client).
99
10-
pub mod configuration;
11-
pub mod utils;
10+
pub mod commands;
11+
mod configuration;
12+
mod utils;

mithril-client-cli/src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#![doc = include_str!("../README.md")]
22

3-
mod commands;
4-
53
use anyhow::Context;
64
use clap::{Parser, Subcommand};
75
use config::{builder::DefaultState, ConfigBuilder, Map, Source, Value, ValueKind};
@@ -15,7 +13,7 @@ use std::{fs::File, path::PathBuf};
1513

1614
use mithril_common::StdResult;
1715

18-
use commands::{
16+
use mithril_client_cli::commands::{
1917
mithril_stake_distribution::MithrilStakeDistributionCommands, snapshot::SnapshotCommands,
2018
};
2119

0 commit comments

Comments
 (0)