Fix MSIHANDLE parameter modification in Rust 1.78.0+ #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rust 1.78.0 seems to have changed the behavior of passing references into FFI functions so that
mut
is required for it to be mutable. (I assume as it should have always done)I was running into issues with the open_view command returning a null MSIHANDLE, when the MSI log shows that it should returning the newly created MSI handle from the OpenView call.
Changing the function signature to include
mut
makes my previously working pre-1.78.0 custom action work again in 1.78.0Ran
cargo test --all-features
and all passed.