@@ -427,15 +427,15 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
427427
428428 // We cap the number of read bytes to the largest value that we are able to fit in both the
429429 // host's and target's `isize`. This saves us from having to handle overflows later.
430- let count = count. min ( this. isize_max ( ) as u64 ) . min ( isize:: max_value ( ) as u64 ) ;
430+ let count = count. min ( this. isize_max ( ) as u64 ) . min ( isize:: MAX as u64 ) ;
431431
432432 if let Some ( FileHandle { file, writable : _ } ) = this. machine . file_handler . handles . get_mut ( & fd) {
433433 // This can never fail because `count` was capped to be smaller than
434- // `isize::max_value() `.
434+ // `isize::MAX `.
435435 let count = isize:: try_from ( count) . unwrap ( ) ;
436436 // We want to read at most `count` bytes. We are sure that `count` is not negative
437437 // because it was a target's `usize`. Also we are sure that its smaller than
438- // `usize::max_value() ` because it is a host's `isize`.
438+ // `usize::MAX ` because it is a host's `isize`.
439439 let mut bytes = vec ! [ 0 ; count as usize ] ;
440440 let result = file
441441 . read ( & mut bytes)
@@ -481,7 +481,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
481481
482482 // We cap the number of written bytes to the largest value that we are able to fit in both the
483483 // host's and target's `isize`. This saves us from having to handle overflows later.
484- let count = count. min ( this. isize_max ( ) as u64 ) . min ( isize:: max_value ( ) as u64 ) ;
484+ let count = count. min ( this. isize_max ( ) as u64 ) . min ( isize:: MAX as u64 ) ;
485485
486486 if let Some ( FileHandle { file, writable : _ } ) = this. machine . file_handler . handles . get_mut ( & fd) {
487487 let bytes = this. memory . read_bytes ( buf, Size :: from_bytes ( count) ) ?;
0 commit comments