@@ -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