Skip to content

Commit 81234ce

Browse files
committed
Remove todo
1 parent de540d0 commit 81234ce

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/shims/unix/fd.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
569569
// because it was a target's `usize`. Also we are sure that its smaller than
570570
// `usize::MAX` because it is bounded by the host's `isize`.
571571

572-
// TODO: shouldn't pass vec, just pass pointer and directly write to it.
573572
let mut bytes = vec![0; usize::try_from(count).unwrap()];
574573
let result = match offset {
575574
None => fd.read(&fd, communicate, &mut bytes, buf, this),
@@ -630,14 +629,12 @@ fn read_byte_helper<'tcx>(
630629
) -> InterpResult<'tcx, Scalar> {
631630
// `File::read` never returns a value larger than `count`, so this cannot fail.
632631
match result?.map(|c| i64::try_from(c).unwrap()) {
633-
// TODO: get the byte out the result, then write the ptr.
634632
// try to pass this the write_ptr inside write
635633
// Pass the pointer inside the write function.
636634
Ok(read_bytes) => {
637635
// If reading to `bytes` did not fail, we write those bytes to the buffer.
638636
// Crucially, if fewer than `bytes.len()` bytes were read, only write
639637
// that much into the output buffer!
640-
// TODO: write to pointer here.
641638
ecx.write_bytes_ptr(
642639
buf,
643640
bytes[..usize::try_from(read_bytes).unwrap()].iter().copied(),

0 commit comments

Comments
 (0)