Skip to content

Commit

Permalink
Cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-mcdaniel committed Sep 4, 2024
1 parent 60d4113 commit b5bc3bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/lir/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,6 @@ impl Env {
self.define_const(name, e.clone());
}
Declaration::FromImport { module, names } => {

let module = module.clone().eval(self)?;
for (name, alias) in names {
let access = module.clone().field(ConstExpr::Symbol(name.clone()));
Expand Down Expand Up @@ -1061,7 +1060,7 @@ impl Env {
/// Define a constant with a given name under this environment.
pub(super) fn define_const(&mut self, name: impl ToString, e: ConstExpr) {
let name = name.to_string();

/*
Removed this code in favor of using Declaration::FromImport
to add types from constant expressions
Expand Down
2 changes: 1 addition & 1 deletion src/lir/expr/declaration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub enum Declaration {
/// Many declarations.
Many(Arc<Vec<Declaration>>),
/// Declare a module
///
///
/// Do NOT instantiate this directly:
/// use the `Declaration::module` method.
/// This will redistribute the declarations to make sure
Expand Down
2 changes: 1 addition & 1 deletion src/lir/expr/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pub enum Expr {
/// Get a field or member from a structure, union, or tuple.
/// For tuples, use an `Int` constant expression to access the nth field (zero indexed).
/// For unions or structures, use a `Symbol` constant expression to access the field.
///
///
/// Do NOT instantiate this directly: use the `.field` method on the container expression.
Member(Box<Self>, ConstExpr),
/// Index an array or pointer with an expression that evaluates to an `Int` at runtime.
Expand Down

0 comments on commit b5bc3bd

Please sign in to comment.