reduce span of unsafe block
This commit is contained in:
@@ -679,15 +679,13 @@ impl MachineState {
|
|||||||
indices: &mut IndexStore,
|
indices: &mut IndexStore,
|
||||||
) -> CallResult {
|
) -> CallResult {
|
||||||
if let Stream::Readline(ptr) = stream {
|
if let Stream::Readline(ptr) = stream {
|
||||||
unsafe {
|
let readline = unsafe { ptr.as_ptr().as_mut() }.unwrap();
|
||||||
let readline = ptr.as_ptr().as_mut().unwrap();
|
readline.set_atoms_for_completion(&self.atom_tbl);
|
||||||
readline.set_atoms_for_completion(&self.atom_tbl);
|
return self.read_term(
|
||||||
return self.read_term(
|
stream,
|
||||||
stream,
|
indices,
|
||||||
indices,
|
MachineState::read_term_from_user_input_eof_handler,
|
||||||
MachineState::read_term_from_user_input_eof_handler,
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Stream::Byte(_) = stream {
|
if let Stream::Byte(_) = stream {
|
||||||
|
|||||||
Reference in New Issue
Block a user