fix: environment warnings

This commit is contained in:
2026-04-01 01:45:35 +02:00
parent 3e5f23a3bf
commit 5605ad0901

View File

@@ -1,5 +1,5 @@
use super::{expression::Expression, prelude::mk_prelude}; use super::{expression::Expression, prelude::mk_prelude};
use std::{cell::RefCell, collections::HashMap, env, path::Path, rc::Rc}; use std::{cell::RefCell, collections::HashMap, rc::Rc};
#[derive(PartialEq, Clone, Debug)] #[derive(PartialEq, Clone, Debug)]
/// A Environment is a stack of `EnvironmentLayer`s. Each `EnvironmentLayer` is a mapping from /// A Environment is a stack of `EnvironmentLayer`s. Each `EnvironmentLayer` is a mapping from
@@ -64,7 +64,7 @@ impl<'a> Environment<'a> {
} }
/// Construct a new `Environment` with `self` as the outer `Environment`. /// Construct a new `Environment` with `self` as the outer `Environment`.
pub fn mk_inner(&self) -> Environment { pub fn mk_inner(&'a self) -> Environment<'a> {
Environment { Environment {
layer: EnvironmentLayer::new(), layer: EnvironmentLayer::new(),
outer: Some(self), outer: Some(self),