Skip to content

Commit

Permalink
cli: Improve converting non-conflicting paths to names in IDL (coral-…
Browse files Browse the repository at this point in the history
  • Loading branch information
acheroncrypto committed Aug 2, 2023
1 parent be8764b commit 2af9cc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2458,7 +2458,7 @@ fn generate_idl_build(no_docs: bool) -> Result<Vec<Idl>> {
let replaced_idl = modified_idl.replace(path, &format!(r#""{name}""#));

// Check whether there is a conflict
let has_conflict = replaced_idl.contains(&format!("::{name}"));
let has_conflict = replaced_idl.contains(&format!(r#"::{name}""#));
if !has_conflict {
modified_idl = replaced_idl;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/idl/idls/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
}
},
{
"name": "idl::State",
"name": "State",
"docs": [
"An account containing various fields"
],
Expand Down

0 comments on commit 2af9cc6

Please sign in to comment.