Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
d-roak committed May 16, 2024
1 parent 26da4b8 commit 9ff081a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions crates/config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::configs::storage::RocksConfig;
use crate::configs::tracing::TracingConfig;

use serde::{Deserialize, Serialize};
use std::path::PathBuf;
use std::path::{Path, PathBuf};

/// Directory path for storing all ramd related data
const RAMD_DIR: &str = ".ramd";
Expand Down Expand Up @@ -115,8 +115,8 @@ impl RamdConfig {
}
}

fn popped_path(path: &PathBuf) -> PathBuf {
let path_string = path.clone().into_os_string().into_string().unwrap();
fn popped_path(path: &Path) -> PathBuf {
let path_string = path.to_path_buf().into_os_string().into_string().unwrap();
let last = path_string.split('/').last().unwrap();

path_string.replace(last, "").into()
Expand Down
6 changes: 3 additions & 3 deletions ramd/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ pub struct Cli {
#[derive(Debug, clap::Subcommand)]
pub enum Subcommand {
/// Runs ramd as bootnode mode, where the only functionalities are peer discovery
Bootnode(BootnodeCmd),
Bootnode(Box<BootnodeCmd>),

/// Runs ramd node with full functionalities
Node(NodeCmd),
Node(Box<NodeCmd>),

// NOTE: This one might make sense to have a separate implementation/repo
/// Runs ramd relayer node. The only functionality is relaying messages
Relayer(RelayerCmd),
Relayer(Box<RelayerCmd>),
}
2 changes: 1 addition & 1 deletion ramd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async fn main() -> Result<()> {
match cli.subcommand {
Some(Subcommand::Bootnode(_)) => Err(eyre!("Bootnode not implemented!")),
Some(Subcommand::Node(flags)) => {
let config: RamdConfig = parse_flags(flags)?.init()?;
let config: RamdConfig = parse_flags(*flags)?.init()?;

// parse .env faile
dotenv().ok();
Expand Down

0 comments on commit 9ff081a

Please sign in to comment.