Skip to content

Commit

Permalink
Merge #2398
Browse files Browse the repository at this point in the history
2398: Fix 'variable does not need to be mutable' warnings r=Hywan a=imor

<!-- 
Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test:
https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests

-->

# Description
<!-- 
Provide details regarding the change including motivation,
links to related issues, and the context of the PR.
-->
When I built wasmer on Windows using the `cargo build` command, I got a couple of _the variable doesn't need to be mutable_ warnings. This PR fixes those warnings.

# Review

As this is an internal change, it shouldn't require an entry in the CHANGELOG.md file.
- [ ] Add a short description of the change to the CHANGELOG.md file


Co-authored-by: Raminder Singh <[email protected]>
  • Loading branch information
bors[bot] and imor authored Jun 6, 2021
2 parents bff9263 + e8a70f0 commit b3a3a80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/engine-universal/src/unwind/windows_x64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl UnwindRegistry {
self.published = true;

if !self.functions.is_empty() {
for (base_address, mut functions) in self.functions.iter_mut() {
for (base_address, functions) in self.functions.iter_mut() {
// Windows heap allocations are 32-bit aligned, but assert just in case
assert_eq!(
(functions.as_mut_ptr() as u64) % 4,
Expand Down Expand Up @@ -97,7 +97,7 @@ impl Drop for UnwindRegistry {
fn drop(&mut self) {
if self.published {
unsafe {
for mut functions in self.functions.values_mut() {
for functions in self.functions.values_mut() {
winnt::RtlDeleteFunctionTable(functions.as_mut_ptr());
}
}
Expand Down

0 comments on commit b3a3a80

Please sign in to comment.