From f3dc02d64613d52bd147cc9c70451b8c06a1b9bd Mon Sep 17 00:00:00 2001 From: David Mak Date: Mon, 9 Sep 2024 14:24:52 +0800 Subject: [PATCH] [meta] Apply cargo fmt --- nac3artiq/src/codegen.rs | 2 +- nac3artiq/src/lib.rs | 8 ++++---- nac3artiq/src/symbol_resolver.rs | 4 ++-- nac3artiq/src/timeline.rs | 4 ++-- nac3standalone/src/basic_symbol_resolver.rs | 2 +- nac3standalone/src/main.rs | 12 ++++++------ 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/nac3artiq/src/codegen.rs b/nac3artiq/src/codegen.rs index 85a5d3e0f..1646c1c65 100644 --- a/nac3artiq/src/codegen.rs +++ b/nac3artiq/src/codegen.rs @@ -32,8 +32,8 @@ use pyo3::{ use crate::{symbol_resolver::InnerResolver, timeline::TimeFns}; -use nac3core::inkwell::values::IntValue; use itertools::Itertools; +use nac3core::inkwell::values::IntValue; use std::{ collections::{hash_map::DefaultHasher, HashMap}, hash::{Hash, Hasher}, diff --git a/nac3artiq/src/lib.rs b/nac3artiq/src/lib.rs index 355787a12..9675efb94 100644 --- a/nac3artiq/src/lib.rs +++ b/nac3artiq/src/lib.rs @@ -23,6 +23,8 @@ use std::process::Command; use std::rc::Rc; use std::sync::Arc; +use itertools::Itertools; +use nac3core::codegen::{gen_func_impl, CodeGenLLVMOptions, CodeGenTargetMachineOptions}; use nac3core::inkwell::{ context::Context, memory_buffer::MemoryBuffer, @@ -32,14 +34,12 @@ use nac3core::inkwell::{ targets::*, OptimizationLevel, }; -use itertools::Itertools; -use nac3core::codegen::{gen_func_impl, CodeGenLLVMOptions, CodeGenTargetMachineOptions}; -use nac3core::toplevel::builtins::get_exn_constructor; -use nac3core::typecheck::typedef::{into_var_map, TypeEnum, Unifier, VarMap}; use nac3core::nac3parser::{ ast::{ExprKind, Stmt, StmtKind, StrRef}, parser::parse_program, }; +use nac3core::toplevel::builtins::get_exn_constructor; +use nac3core::typecheck::typedef::{into_var_map, TypeEnum, Unifier, VarMap}; use pyo3::create_exception; use pyo3::prelude::*; use pyo3::{exceptions, types::PyBytes, types::PyDict, types::PySet}; diff --git a/nac3artiq/src/symbol_resolver.rs b/nac3artiq/src/symbol_resolver.rs index 0ed532a7d..d3381d128 100644 --- a/nac3artiq/src/symbol_resolver.rs +++ b/nac3artiq/src/symbol_resolver.rs @@ -1,11 +1,12 @@ use crate::PrimitivePythonId; +use itertools::Itertools; use nac3core::inkwell::{ module::Linkage, types::{BasicType, BasicTypeEnum}, values::BasicValueEnum, AddressSpace, }; -use itertools::Itertools; +use nac3core::nac3parser::ast::{self, StrRef}; use nac3core::{ codegen::{ classes::{NDArrayType, ProxyType}, @@ -22,7 +23,6 @@ use nac3core::{ typedef::{into_var_map, iter_type_vars, Type, TypeEnum, TypeVar, Unifier, VarMap}, }, }; -use nac3core::nac3parser::ast::{self, StrRef}; use parking_lot::RwLock; use pyo3::{ types::{PyDict, PyTuple}, diff --git a/nac3artiq/src/timeline.rs b/nac3artiq/src/timeline.rs index 01b110157..2f11e967b 100644 --- a/nac3artiq/src/timeline.rs +++ b/nac3artiq/src/timeline.rs @@ -1,9 +1,9 @@ +use itertools::Either; +use nac3core::codegen::CodeGenContext; use nac3core::inkwell::{ values::{BasicValueEnum, CallSiteValue}, AddressSpace, AtomicOrdering, }; -use itertools::Either; -use nac3core::codegen::CodeGenContext; /// Functions for manipulating the timeline. pub trait TimeFns { diff --git a/nac3standalone/src/basic_symbol_resolver.rs b/nac3standalone/src/basic_symbol_resolver.rs index 94f0328ae..369ce1968 100644 --- a/nac3standalone/src/basic_symbol_resolver.rs +++ b/nac3standalone/src/basic_symbol_resolver.rs @@ -1,3 +1,4 @@ +use nac3core::nac3parser::ast::{self, StrRef}; use nac3core::{ codegen::CodeGenContext, symbol_resolver::{SymbolResolver, SymbolValue, ValueEnum}, @@ -7,7 +8,6 @@ use nac3core::{ typedef::{Type, Unifier}, }, }; -use nac3core::nac3parser::ast::{self, StrRef}; use parking_lot::{Mutex, RwLock}; use std::collections::HashSet; use std::{collections::HashMap, sync::Arc}; diff --git a/nac3standalone/src/main.rs b/nac3standalone/src/main.rs index 9ae2e6b44..7f2247b38 100644 --- a/nac3standalone/src/main.rs +++ b/nac3standalone/src/main.rs @@ -10,8 +10,12 @@ use clap::Parser; use nac3core::inkwell::{ - memory_buffer::MemoryBuffer, passes::PassBuilderOptions, support::is_multithreaded, targets::*, - OptimizationLevel, module::Linkage + memory_buffer::MemoryBuffer, module::Linkage, passes::PassBuilderOptions, + support::is_multithreaded, targets::*, OptimizationLevel, +}; +use nac3core::nac3parser::{ + ast::{Constant, Expr, ExprKind, StmtKind, StrRef}, + parser, }; use nac3core::{ codegen::{ @@ -30,10 +34,6 @@ use nac3core::{ typedef::{FunSignature, Type, Unifier, VarMap}, }, }; -use nac3core::nac3parser::{ - ast::{Constant, Expr, ExprKind, StmtKind, StrRef}, - parser, -}; use parking_lot::{Mutex, RwLock}; use std::collections::HashSet; use std::num::NonZeroUsize;