diff options
author | Valentin Anger <syrupthinker@gryphno.de> | 2020-06-29 14:17:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-29 14:17:37 +0200 |
commit | db36857288609858ada259444509a31637980ce3 (patch) | |
tree | 9fc83f32408941bdf75d803b4b0dbffe297c10f2 /cli/module_graph.rs | |
parent | 0374eadcf7ecb054dae1b1587843a2006fdf4c2d (diff) |
refactor: util functions take slices instead of heap values (#6547)
Diffstat (limited to 'cli/module_graph.rs')
-rw-r--r-- | cli/module_graph.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/module_graph.rs b/cli/module_graph.rs index 24a20fa43..3fb1379f3 100644 --- a/cli/module_graph.rs +++ b/cli/module_graph.rs @@ -457,7 +457,7 @@ impl ModuleGraphLoader { url: module_specifier.to_string(), redirect: Some(source_file.url.to_string()), filename: source_file.filename.to_str().unwrap().to_string(), - version_hash: checksum::gen(vec![ + version_hash: checksum::gen(&[ &source_file.source_code, version::DENO.as_bytes(), ]), @@ -474,7 +474,7 @@ impl ModuleGraphLoader { let module_specifier = ModuleSpecifier::from(source_file.url.clone()); let version_hash = - checksum::gen(vec![&source_file.source_code, version::DENO.as_bytes()]); + checksum::gen(&[&source_file.source_code, version::DENO.as_bytes()]); let source_code = String::from_utf8(source_file.source_code)?; if SUPPORTED_MEDIA_TYPES.contains(&source_file.media_type) { |