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

lang: Remove a potential panic while getting the IDL in declare_program! #3458

Conversation

acheroncrypto
Copy link
Collaborator

Problem

A part of the getting the IDL process can panic if getting the environment variable fails:

let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").expect("Failed to get manifest dir");

Although this is unlikely to panic given this is a cargo environment variable, it still makes sense to convert this to an Err variant rather than potentially panicking, especially considering the get_idl function already returning a Result type.

Summary of changes

Remove a potential panic while getting the IDL in declare_program!.

Copy link

vercel bot commented Dec 28, 2024

@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto added lang fix Bug fix PR labels Dec 28, 2024
@acheroncrypto acheroncrypto merged commit ceefae7 into coral-xyz:master Dec 28, 2024
52 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix PR lang
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant