diff options
Diffstat (limited to 'cli/tools/check.rs')
-rw-r--r-- | cli/tools/check.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/tools/check.rs b/cli/tools/check.rs index 77bc0f441..ec1f91a1d 100644 --- a/cli/tools/check.rs +++ b/cli/tools/check.rs @@ -264,8 +264,7 @@ fn get_tsc_roots( } } - // todo(https://github.com/denoland/deno_graph/pull/253/): pre-allocate this - let mut result = Vec::new(); + let mut result = Vec::with_capacity(graph.specifiers_count()); if graph.has_node_specifier { // inject a specifier that will resolve node types result.push(( @@ -313,6 +312,7 @@ fn get_tsc_roots( maybe_get_check_entry(module, check_js) } })); + result } |