Skip to content

Commit

Permalink
Clarify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottt committed Jun 25, 2024
1 parent 202974d commit 39c5598
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/src/async_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ impl FastlyAsyncIo for Session {
let select_fut = self
.select_impl(
memory
// TODO: wiggle only supports slices of u8 in 22.0.0
// TODO: `GuestMemory::as_slice` only supports guest pointers to u8 slices in
// wiggle 22.0.0, but `GuestMemory::to_vec` supports guest pointers to slices
// of arbitrary types. As `GuestMemory::to_vec` will copy the contents of the
// slice out of guest memory, we should switch this to `GuestMemory::as_slice`
// once it is polymorphic in the element type of the slice.
.to_vec(handles)?
.into_iter()
.map(|i| AsyncItemHandle::from(i).into()),
Expand Down
6 changes: 5 additions & 1 deletion lib/src/wiggle_abi/req_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,11 @@ impl FastlyHttpReq for Session {
let done_index = self
.select_impl(
memory
// TODO: wiggle only supports slices of u8 in 22.0.0
// TODO: `GuestMemory::as_slice` only supports guest pointers to u8 slices in
// wiggle 22.0.0, but `GuestMemory::to_vec` supports guest pointers to slices
// of arbitrary types. As `GuestMemory::to_vec` will copy the contents of the
// slice out of guest memory, we should switch this to `GuestMemory::as_slice`
// once it is polymorphic in the element type of the slice.
.to_vec(pending_req_handles)?
.into_iter()
.map(|handle| PendingRequestHandle::from(handle).into()),
Expand Down

0 comments on commit 39c5598

Please sign in to comment.