|  e75c2f8b16 # Objective - `CommandQueue::apply` calculates the address of the end of the internal buffer as a `usize` rather than as a pointer, requiring two casts of `cursor` to `usize`. Casting pointers to integers is generally discouraged and may also prevent optimizations. It's also unnecessary here. ## Solution - Calculate the end address as a pointer rather than a `usize`. Small note: A trivial translation of the old code to use pointers would have computed `end_addr` as `cursor.add(self.bytes.len())`, which is not wrong but is an additional `unsafe` operation that also needs to be properly documented and proven correct. However this operation is already implemented in the form of the safe `as_mut_ptr_range`, so I just used that. | ||
|---|---|---|
| .. | ||
| commands | ||
| adapter_system.rs | ||
| combinator.rs | ||
| exclusive_function_system.rs | ||
| exclusive_system_param.rs | ||
| function_system.rs | ||
| mod.rs | ||
| query.rs | ||
| system_param.rs | ||
| system_registry.rs | ||
| system.rs | ||