Pārlūkot izejas kodu

Make the namespace clonable

For unfortunate reasons, we currently need to clone the namespace. This is
obvioulsly not great, but is the easiest way for now.
Isaac Woods 4 gadi atpakaļ
vecāks
revīzija
32c0d02ab7
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      aml/src/namespace.rs

+ 2 - 0
aml/src/namespace.rs

@@ -35,6 +35,7 @@ pub enum LevelType {
     MethodLocals,
 }
 
+#[derive(Clone, Debug)]
 pub struct NamespaceLevel {
     pub typ: LevelType,
     pub children: BTreeMap<NameSeg, NamespaceLevel>,
@@ -47,6 +48,7 @@ impl NamespaceLevel {
     }
 }
 
+#[derive(Clone)]
 pub struct Namespace {
     /// This is a running count of ids, which are never reused. This is incremented every time we
     /// add a new object to the namespace. We can then remove objects, freeing their memory, without