jets: fix imports and nits

This commit is contained in:
Alex Shelkovnykov 2024-01-31 19:23:39 +09:00
parent d0693218a1
commit 5a8286e17e
2 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@
use crate::interpreter::Context; use crate::interpreter::Context;
use crate::jets::util::*; use crate::jets::util::*;
use crate::jets::Result; use crate::jets::Result;
use crate::noun::{DirectAtom, IndirectAtom, Noun, D}; use crate::noun::{IndirectAtom, Noun, D};
use std::cmp; use std::cmp;
crate::gdb!(); crate::gdb!();

View File

@ -1,8 +1,8 @@
/** Text processing jets /** Text processing jets
*/ */
use crate::interpreter::{interpret, Context, Error}; use crate::interpreter::{interpret, Context};
use crate::jets::util::slot; use crate::jets::util::{slot, BAIL_FAIL};
use crate::jets::{JetErr, Result}; use crate::jets::Result;
use crate::noun::{Cell, Noun, D, T}; use crate::noun::{Cell, Noun, D, T};
use bitvec::order::Lsb0; use bitvec::order::Lsb0;
use bitvec::slice::BitSlice; use bitvec::slice::BitSlice;
@ -82,7 +82,7 @@ pub fn jet_turn(context: &mut Context, subject: Noun) -> Result {
} }
} else { } else {
if unsafe { !list.raw_equals(D(0)) } { if unsafe { !list.raw_equals(D(0)) } {
return Err(JetErr::Fail(Error::Deterministic(D(0)))); return Err(BAIL_FAIL);
} }
unsafe { unsafe {
*dest = D(0); *dest = D(0);
@ -106,7 +106,7 @@ pub fn jet_turn(context: &mut Context, subject: Noun) -> Result {
} }
} else { } else {
if unsafe { !list.raw_equals(D(0)) } { if unsafe { !list.raw_equals(D(0)) } {
return Err(JetErr::Fail(Error::Deterministic(D(0)))); return Err(BAIL_FAIL);
} }
unsafe { unsafe {
*dest = D(0); *dest = D(0);