@@ -569,7 +569,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
569
569
// because it was a target's `usize`. Also we are sure that its smaller than
570
570
// `usize::MAX` because it is bounded by the host's `isize`.
571
571
572
- // TODO: shouldn't pass vec, just pass pointer and directly write to it.
573
572
let mut bytes = vec ! [ 0 ; usize :: try_from( count) . unwrap( ) ] ;
574
573
let result = match offset {
575
574
None => fd. read ( & fd, communicate, & mut bytes, buf, this) ,
@@ -630,14 +629,12 @@ fn read_byte_helper<'tcx>(
630
629
) -> InterpResult < ' tcx , Scalar > {
631
630
// `File::read` never returns a value larger than `count`, so this cannot fail.
632
631
match result?. map ( |c| i64:: try_from ( c) . unwrap ( ) ) {
633
- // TODO: get the byte out the result, then write the ptr.
634
632
// try to pass this the write_ptr inside write
635
633
// Pass the pointer inside the write function.
636
634
Ok ( read_bytes) => {
637
635
// If reading to `bytes` did not fail, we write those bytes to the buffer.
638
636
// Crucially, if fewer than `bytes.len()` bytes were read, only write
639
637
// that much into the output buffer!
640
- // TODO: write to pointer here.
641
638
ecx. write_bytes_ptr (
642
639
buf,
643
640
bytes[ ..usize:: try_from ( read_bytes) . unwrap ( ) ] . iter ( ) . copied ( ) ,
0 commit comments