fix function_casts_as_integer warning
Comparing addresses of function pointers is brittle. Functions may be duplicated resulting in function pointers to the same function to compare !=. Functions may be merged/de-duplicated resulting in function pointers to different function to compare ==. The later shouldn't be relevant here as the function differ in behavior, but mentioning it for completeness.
This commit is contained in:
@@ -64,8 +64,7 @@ impl MachineState {
|
||||
cc: 0,
|
||||
global_clock: 0,
|
||||
dynamic_mode: FirstOrNext::First,
|
||||
unify_fn: MachineState::unify,
|
||||
bind_fn: MachineState::bind,
|
||||
occurs_check: &Nsto,
|
||||
run_cleaners_fn: |_| false,
|
||||
}
|
||||
}
|
||||
@@ -951,7 +950,7 @@ impl MachineState {
|
||||
}
|
||||
};
|
||||
|
||||
(self.bind_fn)(self, r, f_a);
|
||||
self.occurs_check.bind(self, r, f_a);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user