diff --git a/src/cin_implements/nars_python/translators.rs b/src/cin_implements/nars_python/translators.rs index 9e396a2..98b3df5 100644 --- a/src/cin_implements/nars_python/translators.rs +++ b/src/cin_implements/nars_python/translators.rs @@ -66,7 +66,7 @@ pub fn output_translate(content: String) -> Result { }, "exe" => Output::EXE { // TODO: 有待捕获转译 - operation: Operation::new("UNKNOWN", [].into_iter()), + operation: Operation::new("UNKNOWN", []), content_raw: content, }, "err" | "error" => Output::ERROR { diff --git a/src/cin_implements/openjunars/translators.rs b/src/cin_implements/openjunars/translators.rs index 1a25206..87054db 100644 --- a/src/cin_implements/openjunars/translators.rs +++ b/src/cin_implements/openjunars/translators.rs @@ -5,14 +5,13 @@ //! //! TODO: 🚧自OpenNARS复制而来,一些地方需要特别适配 +use crate::runtimes::TranslateError; use anyhow::Result; use navm::{ cmd::Cmd, output::{Operation, Output}, }; -use crate::runtimes::TranslateError; - /// OpenJunars的「输入转译」函数 /// * 🎯用于将统一的「NAVM指令」转译为「OpenJunars Shell输入」 pub fn input_translate(cmd: Cmd) -> Result { @@ -57,7 +56,7 @@ pub fn output_translate(content: String) -> Result { }, "exe" => Output::EXE { // TODO: 有待捕获转译 - operation: Operation::new("UNKNOWN", [].into_iter()), + operation: Operation::new("UNKNOWN", []), content_raw: content, }, "err" | "error" => Output::ERROR { diff --git a/src/test_tools/nal_format/mod.rs b/src/test_tools/nal_format/mod.rs index 6212357..6be607a 100644 --- a/src/test_tools/nal_format/mod.rs +++ b/src/test_tools/nal_format/mod.rs @@ -3,8 +3,6 @@ //! * 🎯提供一种(部分)兼容现有`.nal`格式文件的语法 //! * ⚠️对其中所有Narsese部分使用CommonNarsese「通用纳思语」:不兼容方言 -use std::{result::Result::Err as StdErr, result::Result::Ok as StdOk, time::Duration}; - use super::structs::*; use anyhow::{Ok, Result}; use narsese::{ @@ -14,6 +12,7 @@ use narsese::{ use navm::{cmd::Cmd, output::Operation}; use pest::{iterators::Pair, Parser}; use pest_derive::Parser; +use std::{result::Result::Err as StdErr, result::Result::Ok as StdOk, time::Duration}; use util::{first, pipe}; #[derive(Parser)] // ! ↓ 必须从项目根目录开始