Skip to content

Commit

Permalink
Fix call_with_config string
Browse files Browse the repository at this point in the history
  • Loading branch information
dhilst committed Sep 3, 2024
1 parent 29af9ee commit 4366252
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions crates/cargo-contract/src/cmd/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,10 @@ macro_rules! call_with_config_internal {
)*
_ => {

let configs = vec![$(stringify!($config)),*].iter()
.map(|s| s.trim_start_matches("crate::cmd::config::"))
.collect::<Vec<_>>()
.join(", ");
let configs = vec![$(stringify!($config)),*].join(", ");
Err(ErrorVariant::Generic(
contract_extrinsics::GenericError::from_message(
format!("Chain configuration not found, Allowed configurations: {configs}")
format!("====================>> {} Chain configuration not found, Allowed configurations: {configs}", $config_name)
)))
},
}
Expand All @@ -236,7 +233,7 @@ macro_rules! call_with_config_internal {
#[macro_export]
macro_rules! call_with_config {
($obj:tt, $function:ident, $config_name:expr) => {{
let config_name = format!("crate::cmd::config::{}", $config_name);
let config_name = format!("$crate :: cmd :: config :: {}", $config_name);
$crate::call_with_config_internal!(
$obj,
$function,
Expand Down

0 comments on commit 4366252

Please sign in to comment.