From 383b8e6d866d3dc55abf17bb329c1f01d3c768bd Mon Sep 17 00:00:00 2001 From: Matthew LeVan Date: Mon, 18 Mar 2024 09:55:59 -0400 Subject: [PATCH] serf: flog where possible --- rust/ares/src/serf.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rust/ares/src/serf.rs b/rust/ares/src/serf.rs index 9a94596..7a87f1a 100644 --- a/rust/ares/src/serf.rs +++ b/rust/ares/src/serf.rs @@ -1,5 +1,5 @@ use crate::hamt::Hamt; -use crate::interpreter; +use crate::{flog, interpreter}; use crate::interpreter::{inc, interpret, Error, Mote}; use crate::jets::cold::Cold; use crate::jets::hot::{Hot, HotEntry}; @@ -353,18 +353,18 @@ pub fn serf(constant_hot_state: &[HotEntry]) -> io::Result<()> { tas!(b"live") => { let inner = slot(writ, 6)?.as_direct().unwrap(); match inner.data() { - tas!(b"cram") => eprintln!("\r %cram: not implemented"), + tas!(b"cram") => flog!(&mut context.nock_context, "\r %cram: not implemented"), tas!(b"exit") => { - eprintln!("\r %exit"); + flog!(&mut context.nock_context, "\r %exit"); std::process::exit(0); } tas!(b"save") => { // XX what is eve for? pma_sync(); } - tas!(b"meld") => eprintln!("\r %meld: not implemented"), - tas!(b"pack") => eprintln!("\r %pack: not implemented"), - _ => eprintln!("unknown live"), + tas!(b"meld") => flog!(&mut context.nock_context, "\r %meld: not implemented"), + tas!(b"pack") => flog!(&mut context.nock_context, "\r %pack: not implemented"), + _ => flog!(&mut context.nock_context, "unknown live"), } context.live(); } @@ -607,7 +607,7 @@ fn work_swap(context: &mut Context, job: Noun, goof: Noun) { context.work_swap(ovo, fec); } Err(goof_crud) => { - eprintln!("\rserf: bail"); + flog!(&mut context.nock_context, "\rserf: bail"); let stack = &mut context.nock_context.stack; let lud = T(stack, &[goof_crud, goof, D(0)]); context.work_bail(lud);