Skip to content

Commit 9812963

Browse files
committed
Use err_unsup_format instead
1 parent b44fd97 commit 9812963

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/helpers.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
101101

102102
if this.machine.communicate {
103103
// Fill the buffer using the host's rng.
104-
getrandom::getrandom(&mut data).map_err(|err| {
105-
InterpError::Unsupported(UnsupportedOpInfo::Unsupported(err.to_string()))
106-
})?;
104+
getrandom::getrandom(&mut data)
105+
.map_err(|err| err_unsup_format!("getrandom failed: {}", err))?;
107106
}
108107
else {
109108
let rng = this.memory_mut().extra.rng.get_mut();

0 commit comments

Comments
 (0)