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 33e9acc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/src/async_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ 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 slices to arbitrary types.
// Once wiggle supports making slices to guest memory of arbitrary types, we
// should switch this back to `as_slice` to avoid reifying the whole vector.
.to_vec(handles)?
.into_iter()
.map(|i| AsyncItemHandle::from(i).into()),
Expand Down
5 changes: 4 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,10 @@ 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 slices to arbitrary types.
// Once wiggle supports making slices to guest memory of arbitrary types, we
// should switch this back to `as_slice` to avoid reifying the whole vector.
.to_vec(pending_req_handles)?
.into_iter()
.map(|handle| PendingRequestHandle::from(handle).into()),
Expand Down

0 comments on commit 33e9acc

Please sign in to comment.