From 51878fae58fc59f96ee9655a6c38196c270b7fef Mon Sep 17 00:00:00 2001 From: Jan Ferdinand Sauer Date: Wed, 18 Oct 2023 14:04:30 +0200 Subject: [PATCH] chore: simplify `use`s --- triton-vm/src/op_stack.rs | 3 +-- triton-vm/src/table/op_stack_table.rs | 16 +++------------- triton-vm/src/table/program_table.rs | 11 ++--------- triton-vm/src/table/ram_table.rs | 16 +++------------- 4 files changed, 9 insertions(+), 37 deletions(-) diff --git a/triton-vm/src/op_stack.rs b/triton-vm/src/op_stack.rs index 0696db9f..8ef04c31 100644 --- a/triton-vm/src/op_stack.rs +++ b/triton-vm/src/op_stack.rs @@ -15,10 +15,9 @@ use twenty_first::shared_math::digest::Digest; use twenty_first::shared_math::tip5::DIGEST_LENGTH; use twenty_first::shared_math::x_field_element::XFieldElement; +use crate::error::InstructionError::*; use crate::op_stack::OpStackElement::*; -use super::error::InstructionError::*; - /// The number of registers dedicated to the top of the operational stack. pub const NUM_OP_STACK_REGISTERS: usize = OpStackElement::COUNT; diff --git a/triton-vm/src/table/op_stack_table.rs b/triton-vm/src/table/op_stack_table.rs index 4c82ceeb..9f29b464 100644 --- a/triton-vm/src/table/op_stack_table.rs +++ b/triton-vm/src/table/op_stack_table.rs @@ -16,23 +16,13 @@ use crate::aet::AlgebraicExecutionTrace; use crate::op_stack::OpStackElement; use crate::table::challenges::ChallengeId::*; use crate::table::challenges::Challenges; -use crate::table::constraint_circuit::ConstraintCircuitBuilder; -use crate::table::constraint_circuit::DualRowIndicator; use crate::table::constraint_circuit::DualRowIndicator::*; -use crate::table::constraint_circuit::SingleRowIndicator; use crate::table::constraint_circuit::SingleRowIndicator::*; -use crate::table::cross_table_argument::CrossTableArg; -use crate::table::cross_table_argument::LookupArg; -use crate::table::cross_table_argument::PermArg; -use crate::table::table_column::MasterBaseTableColumn; -use crate::table::table_column::MasterExtTableColumn; -use crate::table::table_column::OpStackBaseTableColumn; +use crate::table::constraint_circuit::*; +use crate::table::cross_table_argument::*; use crate::table::table_column::OpStackBaseTableColumn::*; -use crate::table::table_column::OpStackExtTableColumn; use crate::table::table_column::OpStackExtTableColumn::*; -use crate::table::table_column::ProcessorBaseTableColumn; - -use super::constraint_circuit::ConstraintCircuitMonad; +use crate::table::table_column::*; pub const BASE_WIDTH: usize = OpStackBaseTableColumn::COUNT; pub const EXT_WIDTH: usize = OpStackExtTableColumn::COUNT; diff --git a/triton-vm/src/table/program_table.rs b/triton-vm/src/table/program_table.rs index 1232ec92..74a3d8bc 100644 --- a/triton-vm/src/table/program_table.rs +++ b/triton-vm/src/table/program_table.rs @@ -17,22 +17,15 @@ use crate::aet::AlgebraicExecutionTrace; use crate::stark::StarkHasher; use crate::table::challenges::ChallengeId::*; use crate::table::challenges::Challenges; -use crate::table::constraint_circuit::ConstraintCircuitBuilder; -use crate::table::constraint_circuit::DualRowIndicator; use crate::table::constraint_circuit::DualRowIndicator::*; -use crate::table::constraint_circuit::SingleRowIndicator; use crate::table::constraint_circuit::SingleRowIndicator::*; +use crate::table::constraint_circuit::*; use crate::table::cross_table_argument::CrossTableArg; use crate::table::cross_table_argument::EvalArg; use crate::table::cross_table_argument::LookupArg; -use crate::table::table_column::MasterBaseTableColumn; -use crate::table::table_column::MasterExtTableColumn; -use crate::table::table_column::ProgramBaseTableColumn; use crate::table::table_column::ProgramBaseTableColumn::*; -use crate::table::table_column::ProgramExtTableColumn; use crate::table::table_column::ProgramExtTableColumn::*; - -use super::constraint_circuit::ConstraintCircuitMonad; +use crate::table::table_column::*; pub const BASE_WIDTH: usize = ProgramBaseTableColumn::COUNT; pub const EXT_WIDTH: usize = ProgramExtTableColumn::COUNT; diff --git a/triton-vm/src/table/ram_table.rs b/triton-vm/src/table/ram_table.rs index 93aaf4cd..413d3776 100644 --- a/triton-vm/src/table/ram_table.rs +++ b/triton-vm/src/table/ram_table.rs @@ -19,23 +19,13 @@ use crate::aet::AlgebraicExecutionTrace; use crate::instruction::Instruction; use crate::table::challenges::ChallengeId::*; use crate::table::challenges::Challenges; -use crate::table::constraint_circuit::ConstraintCircuitBuilder; -use crate::table::constraint_circuit::DualRowIndicator; use crate::table::constraint_circuit::DualRowIndicator::*; -use crate::table::constraint_circuit::SingleRowIndicator; use crate::table::constraint_circuit::SingleRowIndicator::*; -use crate::table::cross_table_argument::CrossTableArg; -use crate::table::cross_table_argument::LookupArg; -use crate::table::cross_table_argument::PermArg; -use crate::table::table_column::MasterBaseTableColumn; -use crate::table::table_column::MasterExtTableColumn; -use crate::table::table_column::ProcessorBaseTableColumn; -use crate::table::table_column::RamBaseTableColumn; +use crate::table::constraint_circuit::*; +use crate::table::cross_table_argument::*; use crate::table::table_column::RamBaseTableColumn::*; -use crate::table::table_column::RamExtTableColumn; use crate::table::table_column::RamExtTableColumn::*; - -use super::constraint_circuit::ConstraintCircuitMonad; +use crate::table::table_column::*; pub const BASE_WIDTH: usize = RamBaseTableColumn::COUNT; pub const EXT_WIDTH: usize = RamExtTableColumn::COUNT;