From 958e287f6917ac0da61eaed904f2b42da6b09b1b Mon Sep 17 00:00:00 2001 From: limuy Date: Sun, 25 Feb 2024 19:22:48 +0800 Subject: [PATCH] fix clippy --- rust/src/base/stdlib.rs | 1 - rust/src/compiler.rs | 2 -- rust/src/main.rs | 1 - rust/src/tvm.rs | 4 ++-- rust/src/tvm/types/data_structure/sam.rs | 2 +- rust/src/tvm/types/trcbool.rs | 1 - 6 files changed, 3 insertions(+), 8 deletions(-) diff --git a/rust/src/base/stdlib.rs b/rust/src/base/stdlib.rs index 064018bd..864ab5c4 100644 --- a/rust/src/base/stdlib.rs +++ b/rust/src/base/stdlib.rs @@ -1,6 +1,5 @@ use super::{codegen::Opcode, error::*}; use crate::{ - base::error::{ARGUMENT_ERROR, ARGU_NUMBER, EXPECT_TYPE}, compiler::{ scope::{Type, TypeAllowNull, Var}, token::TokenType, diff --git a/rust/src/compiler.rs b/rust/src/compiler.rs index 608b1fc4..7dd06bad 100644 --- a/rust/src/compiler.rs +++ b/rust/src/compiler.rs @@ -6,8 +6,6 @@ pub mod llvm_convent; pub mod scope; pub mod token; -use rust_i18n::t; - use self::token::TokenLex; use crate::base::codegen::{ConstPool, StaticData}; use crate::base::error::*; diff --git a/rust/src/main.rs b/rust/src/main.rs index 3079b9b7..197b4581 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -1,4 +1,3 @@ -use rust_i18n::t; use trc::run; fn main() -> Result<(), Box> { diff --git a/rust/src/tvm.rs b/rust/src/tvm.rs index d8c0b346..d34804ea 100644 --- a/rust/src/tvm.rs +++ b/rust/src/tvm.rs @@ -8,8 +8,8 @@ mod types; use self::types::trcfloat::{div_float, exact_div_float, TrcFloat}; use self::types::trcint::{div_int, exact_div_int, mod_int, power_int, TrcInt}; use self::types::trcstr::TrcStr; -use self::types::{TrcBool, TrcChar, TrcObj}; -use crate::base::codegen::{self, Opcode, StaticData}; +use self::types::{TrcBool, TrcChar}; +use crate::base::codegen::{Opcode, StaticData}; use crate::base::stdlib::STD_FUNC_TABLE; use crate::{base::error::*, cfg}; use libloading::Library; diff --git a/rust/src/tvm/types/data_structure/sam.rs b/rust/src/tvm/types/data_structure/sam.rs index 26bc0ca0..1f7898b8 100644 --- a/rust/src/tvm/types/data_structure/sam.rs +++ b/rust/src/tvm/types/data_structure/sam.rs @@ -3,7 +3,7 @@ use crate::base::stdlib::{OverrideWrapper, RustFunction}; use crate::tvm::types::trcchar::TrcChar; use crate::tvm::types::TrcObj; use crate::tvm::DynaData; -use crate::{base::stdlib::IOType, compiler::token::TokenType, hash_map}; +use crate::{compiler::token::TokenType, hash_map}; use derive::{trc_class, trc_function, trc_method}; use std::collections::HashMap; use std::fmt::Display; diff --git a/rust/src/tvm/types/trcbool.rs b/rust/src/tvm/types/trcbool.rs index cef55a5f..68ea5c55 100644 --- a/rust/src/tvm/types/trcbool.rs +++ b/rust/src/tvm/types/trcbool.rs @@ -1,6 +1,5 @@ use super::TrcObj; use crate::base::error::*; -use crate::base::error::{ErrorInfo, OPERATOR_ERROR, OPERATOR_IS_NOT_SUPPORT}; use crate::base::stdlib::*; use crate::compiler::scope::TypeAllowNull; use crate::compiler::token::TokenType;