Skip to content

Commit

Permalink
apply code review
Browse files Browse the repository at this point in the history
  • Loading branch information
kayagokalp committed Dec 12, 2024
1 parent f03b598 commit fadc4ee
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions forc-plugins/forc-node/src/chain_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ impl Display for ChainConfig {
}
}
}

impl From<ChainConfig> for PathBuf {
fn from(value: ChainConfig) -> Self {
let user_forc_dir = user_forc_directory().join(CONFIG_FOLDER);

match value {
ChainConfig::Local => user_forc_dir.join(LOCAL_CONFIG_FOLDER_NAME),
ChainConfig::Testnet => user_forc_dir.join(TESTNET_CONFIG_FOLDER_NAME),
ChainConfig::Ignition => user_forc_dir.join(IGNITION_CONFIG_FOLDER_NAME),
}
let folder_name = match value {
ChainConfig::Local => LOCAL_CONFIG_FOLDER_NAME,
ChainConfig::Testnet => TESTNET_CONFIG_FOLDER_NAME,
ChainConfig::Ignition => IGNITION_CONFIG_FOLDER_NAME,
};
user_forc_directory().join(CONFIG_FOLDER).join(folder_name)
}
}

Expand Down

0 comments on commit fadc4ee

Please sign in to comment.