From e9e8bb577c1dcffc8deec8eb4a048841badba253 Mon Sep 17 00:00:00 2001 From: Nick Drozd Date: Sat, 20 Apr 2024 01:08:27 -0400 Subject: [PATCH] Join imports --- src/blocks.rs | 8 +++++--- src/machine.rs | 8 +++++--- src/reason.rs | 8 +++++--- src/rules.rs | 3 +-- src/tape.rs | 8 +++++--- src/tree.rs | 10 ++++------ 6 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/blocks.rs b/src/blocks.rs index 50ff77ae..870f5060 100644 --- a/src/blocks.rs +++ b/src/blocks.rs @@ -1,8 +1,10 @@ use pyo3::pyfunction; -use crate::instrs::{Color, Shift}; -use crate::parse::tcompile; -use crate::tape::{BasicTape, Count}; +use crate::{ + instrs::{Color, Shift}, + parse::tcompile, + tape::{BasicTape, Count}, +}; struct BlockMeasure { tape: BasicTape, diff --git a/src/machine.rs b/src/machine.rs index 09bf17f4..1ba82a5a 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -2,9 +2,11 @@ use std::collections::HashMap; use pyo3::{pyclass, pyfunction, pymethods}; -use crate::instrs::{Slot, State}; -use crate::parse::tcompile; -use crate::tape::{BasicTape as Tape, Count, HeadTape}; +use crate::{ + instrs::{Slot, State}, + parse::tcompile, + tape::{BasicTape as Tape, Count, HeadTape}, +}; type Step = u64; diff --git a/src/reason.rs b/src/reason.rs index 2e0b7754..54016c6a 100644 --- a/src/reason.rs +++ b/src/reason.rs @@ -2,9 +2,11 @@ use std::collections::{HashMap, HashSet}; use pyo3::pyfunction; -use crate::instrs::{Color, CompThin, Instr, Shift, Slot, State}; -use crate::parse::{parse, parse_to_vec, tcompile}; -use crate::tape::BasicTape as Tape; +use crate::{ + instrs::{Color, CompThin, Instr, Shift, Slot, State}, + parse::{parse, parse_to_vec, tcompile}, + tape::BasicTape as Tape, +}; type Step = u64; diff --git a/src/rules.rs b/src/rules.rs index 91f85cc9..89557fad 100644 --- a/src/rules.rs +++ b/src/rules.rs @@ -1,7 +1,6 @@ use std::collections::HashMap; -use pyo3::create_exception; -use pyo3::exceptions::PyException; +use pyo3::{create_exception, exceptions::PyException}; use crate::tape::{Count, Index, IndexTape}; diff --git a/src/tape.rs b/src/tape.rs index 31523477..1525b1b6 100644 --- a/src/tape.rs +++ b/src/tape.rs @@ -1,6 +1,8 @@ -use core::cell::Cell; -use core::fmt::{Display, Formatter, Result}; -use core::iter::{once, repeat}; +use core::{ + cell::Cell, + fmt::{Display, Formatter, Result}, + iter::{once, repeat}, +}; use crate::instrs::{Color, Shift}; diff --git a/src/tree.rs b/src/tree.rs index 4ad19d18..bfa0744a 100644 --- a/src/tree.rs +++ b/src/tree.rs @@ -1,10 +1,8 @@ -use pyo3::create_exception; -use pyo3::exceptions::PyException; -use pyo3::{pyfunction, PyResult}; +use pyo3::{ + create_exception, exceptions::PyException, pyfunction, PyResult, +}; -use crate::instrs::Slot; -use crate::parse::tcompile; -use crate::tape::BasicTape as Tape; +use crate::{instrs::Slot, parse::tcompile, tape::BasicTape as Tape}; type Step = u64;