Skip to content

Commit 19b85a6

Browse files
committed
Remove todo
1 parent 019c10d commit 19b85a6

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
@@ -568,7 +568,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
568568
// because it was a target's `usize`. Also we are sure that its smaller than
569569
// `usize::MAX` because it is bounded by the host's `isize`.
570570

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

0 commit comments

Comments
 (0)