Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix stable clippy::upper_case_acronyms #1239

Merged
merged 2 commits into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions forest/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ use utils::{read_file_to_string, read_toml};
about = env!("CARGO_PKG_DESCRIPTION"),
author = env!("CARGO_PKG_AUTHORS")
)]
pub struct CLI {
pub struct Cli {
#[structopt(flatten)]
pub opts: CLIOpts,
pub opts: CliOpts,
#[structopt(subcommand)]
pub cmd: Option<Subcommand>,
}
Expand Down Expand Up @@ -87,7 +87,7 @@ pub enum Subcommand {

/// CLI options
#[derive(StructOpt, Debug)]
pub struct CLIOpts {
pub struct CliOpts {
#[structopt(short, long, help = "A toml file containing relevant configurations")]
pub config: Option<String>,
#[structopt(short, long, help = "The genesis CAR file")]
Expand Down Expand Up @@ -137,7 +137,7 @@ pub struct CLIOpts {
pub encrypt_keystore: Option<bool>,
}

impl CLIOpts {
impl CliOpts {
pub fn to_config(&self) -> Result<Config, io::Error> {
let mut cfg: Config = match &self.config {
Some(config_file) => {
Expand Down
6 changes: 3 additions & 3 deletions forest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ mod daemon;
mod logger;
mod subcommand;

use cli::{cli_error_and_die, CLI};
use cli::{cli_error_and_die, Cli};
use structopt::StructOpt;

#[async_std::main]
async fn main() {
logger::setup_logger();
// Capture CLI inputs
let CLI { opts, cmd } = CLI::from_args();
// Capture Cli inputs
let Cli { opts, cmd } = Cli::from_args();

// Run forest as a daemon if no other subcommands are used. Otherwise, run the subcommand.
match opts.to_config() {
Expand Down
8 changes: 4 additions & 4 deletions node/rpc-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ pub enum JsonRpcResponse<R> {
},
}

struct URL {
struct Url {
protocol: String,
port: String,
host: String,
}

/// Parses a multiaddress into a URL
/// Parses a multiaddress into a Url
fn multiaddress_to_url(multiaddr: Multiaddr) -> String {
// Fold Multiaddress into a URL struct
// Fold Multiaddress into a Url struct
let addr = multiaddr.into_iter().fold(
URL {
Url {
protocol: DEFAULT_PROTOCOL.to_owned(),
port: DEFAULT_PORT.to_owned(),
host: DEFAULT_HOST.to_owned(),
Expand Down