Skip to content

Commit f4d1841

Browse files
committed
Remove unnecessary cast
1 parent 4c1beb2 commit f4d1841

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/shims/posix/foreign_items.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use shims::posix::fs::EvalContextExt as _;
1212
use shims::posix::sync::EvalContextExt as _;
1313
use shims::posix::thread::EvalContextExt as _;
1414

15-
1615
impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriEvalContext<'mir, 'tcx> {}
1716
pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx> {
1817
fn emulate_foreign_item_by_name(
@@ -77,9 +76,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
7776
// host's and target's `isize`. This saves us from
7877
// having to handle overflows later.
7978
let count = count.min(this.machine_isize_max() as u64).min(isize::MAX as u64);
80-
// This can never fail because `count` was capped
81-
// to be smaller than `isize::MAX`.
82-
let count = isize::try_from(count).unwrap();
8379

8480
// We want to read at most `count` bytes. We are
8581
// sure that `count` is not negative because it

0 commit comments

Comments
 (0)