summaryrefslogtreecommitdiff
path: root/src/purgatory.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/purgatory.rs')
-rw-r--r--src/purgatory.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/purgatory.rs b/src/purgatory.rs
index b4d8666..04024db 100644
--- a/src/purgatory.rs
+++ b/src/purgatory.rs
@@ -26,7 +26,7 @@ pub fn purgatory_id() -> RoomId {
RoomId{name: String::from("+")}
}
-pub fn create_purgatory<'a, 'b>(encyclopedia: Encyclopedia) -> Room<'a, 'b> {
+pub fn create_purgatory<'a, 'b>(encyclopedia: &Encyclopedia) -> Room<'a, 'b> {
let dispatcher = DispatcherBuilder::new()
.with(Volate, "volate", &[])
.with(RegisterNew::default(), "registernew", &[])
@@ -38,7 +38,7 @@ pub fn create_purgatory<'a, 'b>(encyclopedia: Encyclopedia) -> Room<'a, 'b> {
.with(Create, "create", &["view"])
.with(Remove, "remove", &["view", "move"])
.build();
- let mut room = Room::new(purgatory_id(), encyclopedia, dispatcher);
+ let mut room = Room::new(purgatory_id(), encyclopedia.clone(), dispatcher);
room.load_from_template(&RoomTemplate::from_json(&json!({
"width": 15,
"height": 20,