From 896dd56b7af06fea6604a5596a6ffd17e7e52e6e Mon Sep 17 00:00:00 2001 From: Yiyu Lin Date: Fri, 6 Jan 2023 03:29:50 +0800 Subject: refactor(cli,core,ext,rt): remove some unnecessary `clone` or `malloc` (#17274) --- cli/bench/http.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cli/bench') diff --git a/cli/bench/http.rs b/cli/bench/http.rs index c95ba9721..7c416f93c 100644 --- a/cli/bench/http.rs +++ b/cli/bench/http.rs @@ -1,8 +1,10 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -use super::Result; use std::sync::atomic::{AtomicU16, Ordering}; use std::{collections::HashMap, path::Path, process::Command, time::Duration}; + +use super::Result; + pub use test_util::{parse_wrk_output, WrkOutput as HttpBenchmarkResult}; // Some of the benchmarks in this file have been renamed. In case the history // somehow gets messed up: @@ -27,7 +29,7 @@ pub fn benchmark( let mut res = HashMap::new(); let manifest_dir = Path::new(env!("CARGO_MANIFEST_DIR")); let http_dir = manifest_dir.join("bench").join("http"); - for entry in std::fs::read_dir(http_dir.clone())? { + for entry in std::fs::read_dir(&http_dir)? { let entry = entry?; let pathbuf = entry.path(); let path = pathbuf.to_str().unwrap(); -- cgit v1.2.3