mirror of
https://github.com/urbit/ares.git
synced 2024-11-22 15:08:54 +03:00
jets: fix imports and nits
This commit is contained in:
parent
d0693218a1
commit
5a8286e17e
@ -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!();
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user