summaryrefslogtreecommitdiff
path: root/cli/global_state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/global_state.rs')
-rw-r--r--cli/global_state.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/global_state.rs b/cli/global_state.rs
index 4e9bdbb99..50c306a44 100644
--- a/cli/global_state.rs
+++ b/cli/global_state.rs
@@ -139,13 +139,13 @@ impl GlobalState {
};
Ok(CompiledModule {
- code: String::from_utf8(out.source_code)?,
+ code: String::from_utf8(out.source_code.clone())?,
name: out.url.to_string(),
})
}
}
_ => Ok(CompiledModule {
- code: String::from_utf8(out.source_code)?,
+ code: String::from_utf8(out.source_code.clone())?,
name: out.url.to_string(),
}),
}?;
@@ -154,9 +154,9 @@ impl GlobalState {
if let Some(ref lockfile) = state2.lockfile {
let mut g = lockfile.lock().unwrap();
if state2.flags.lock_write {
- g.insert(&compiled_module);
+ g.insert(&out.url, out.source_code);
} else {
- let check = match g.check(&compiled_module) {
+ let check = match g.check(&out.url, out.source_code) {
Err(e) => return Err(ErrBox::from(e)),
Ok(v) => v,
};