summaryrefslogtreecommitdiffstats
path: root/crates
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2024-04-27 20:14:52 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2024-04-27 20:14:52 +0200
commit164b00565a0ccf858f180f5202e557883323b458 (patch)
treecf550aad29982d4c3196279cda98a95f4cc5023b /crates
parent2bb589d655d1581b71ea6563b006f2daef8ea0ff (diff)
downloadrebel-164b00565a0ccf858f180f5202e557883323b458.tar
rebel-164b00565a0ccf858f180f5202e557883323b458.zip
rebel-lang: Remove Clone from Scope and Context
Diffstat (limited to 'crates')
-rw-r--r--crates/rebel-lang/src/scope.rs4
-rw-r--r--crates/rebel-lang/src/typing.rs2
-rw-r--r--crates/rebel-lang/src/value.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/crates/rebel-lang/src/scope.rs b/crates/rebel-lang/src/scope.rs
index 6dcc7ee..b8a66ce 100644
--- a/crates/rebel-lang/src/scope.rs
+++ b/crates/rebel-lang/src/scope.rs
@@ -2,7 +2,7 @@ use std::collections::HashMap;
use rebel_parse::ast;
-#[derive(Debug, Clone)]
+#[derive(Debug)]
pub struct Module<T>(HashMap<String, ModuleEntry<T>>);
impl<T> Module<T> {
@@ -28,7 +28,7 @@ impl<T> Default for Module<T> {
}
}
-#[derive(Debug, Clone)]
+#[derive(Debug)]
pub enum ModuleEntry<T> {
Module(Module<T>),
Def(T),
diff --git a/crates/rebel-lang/src/typing.rs b/crates/rebel-lang/src/typing.rs
index 34492a6..fd9e2af 100644
--- a/crates/rebel-lang/src/typing.rs
+++ b/crates/rebel-lang/src/typing.rs
@@ -166,7 +166,7 @@ impl Display for ArrayLen {
}
}
-#[derive(Debug, Clone, Default)]
+#[derive(Debug, Default)]
pub struct Context {
pub values: Module<Type>,
pub methods: HashMap<TypeFamily, HashMap<&'static str, FuncType>>,
diff --git a/crates/rebel-lang/src/value.rs b/crates/rebel-lang/src/value.rs
index c7e971e..c07f62c 100644
--- a/crates/rebel-lang/src/value.rs
+++ b/crates/rebel-lang/src/value.rs
@@ -171,7 +171,7 @@ impl<'a> Display for ScriptStringify<'a> {
}
}
-#[derive(Debug, Clone, Default)]
+#[derive(Debug, Default)]
pub struct Context {
pub values: Module<Value>,
pub methods: HashMap<TypeFamily, HashMap<&'static str, Func>>,