firecracker
firecracker copied to clipboard
refactor: simplify get_msr_chunks
Changes
Move logic to create single msr chunk into separate function. Also use iterators for msr indexes to remove some unneeded allocations.
Reason
Minor simplification and removal of unneeded allocations.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.
PR Checklist
- [ ] If a specific issue led to this PR, this PR closes the issue.
- [ ] The description of changes is clear and encompassing.
- [ ] Any required documentation changes (code and docs) are included in this PR.
- [ ] API changes follow the Runbook for Firecracker API changes.
- [ ] User-facing changes are mentioned in
CHANGELOG.md
. - [ ] All added/changed functionality is tested.
- [ ] New
TODO
s link to an issue. - [ ] Commits meet contribution quality standards.
- [ ] This functionality cannot be added in
rust-vmm
.