Use an implicit generic associated type to realize GuestMemory::iter(). This removes the pre-GAT workaround used here to get an iterator that borrows values with the same lifetime as the &self parameter to .iter().
This is a follow up from a discussion between @Ablu and me on Slack. I was cleaning up my workspace and decided to just put it out here to get some comments. Note that this requires rustc 1.75.0 to compile, so it might not be something we want to do in the near future.
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
[ ] All commits in this PR are signed (with git commit -s), and the commit
message has max 60 characters for the summary and max 75 characters for each
description line.
[ ] All added/changed functionality has a corresponding unit/integration
test.
[ ] All added/changed public-facing functionality has entries in the "Upcoming
Release" section of CHANGELOG.md (if no such section exists, please create one).
[ ] Any newly added unsafe code is properly documented.
Use an implicit generic associated type to realize GuestMemory::iter(). This removes the pre-GAT workaround used here to get an iterator that borrows values with the same lifetime as the
&self
parameter to.iter()
.This is a follow up from a discussion between @Ablu and me on Slack. I was cleaning up my workspace and decided to just put it out here to get some comments. Note that this requires rustc 1.75.0 to compile, so it might not be something we want to do in the near future.
Requirements
Before submitting your PR, please make sure you addressed the following requirements:
git commit -s
), and the commit message has max 60 characters for the summary and max 75 characters for each description line.unsafe
code is properly documented.