summaryrefslogtreecommitdiff
path: root/cli/tools/test_runner.rs
diff options
context:
space:
mode:
authorYusuke Tanaka <yusuktan@maguro.dev>2021-07-30 22:03:41 +0900
committerGitHub <noreply@github.com>2021-07-30 15:03:41 +0200
commit8f00b5542caffd14988b923efe4f066b712d2858 (patch)
treee56ebefb0b73a2205bc482a0a6f55e87bd35a92b /cli/tools/test_runner.rs
parentc909faf9e6cd2964398da7c0852d0229cdd1a22b (diff)
chore: upgrade Rust to 1.54.0 (#11554)
Diffstat (limited to 'cli/tools/test_runner.rs')
-rw-r--r--cli/tools/test_runner.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/tools/test_runner.rs b/cli/tools/test_runner.rs
index a9610015e..656db50f4 100644
--- a/cli/tools/test_runner.rs
+++ b/cli/tools/test_runner.rs
@@ -355,7 +355,7 @@ fn extract_files_from_regex_blocks(
lines_regex: &Regex,
) -> Result<Vec<File>, AnyError> {
let files = blocks_regex
- .captures_iter(&source)
+ .captures_iter(source)
.filter_map(|block| {
let maybe_attributes = block
.get(1)
@@ -390,7 +390,7 @@ fn extract_files_from_regex_blocks(
// TODO(caspervonb) generate an inline source map
let mut file_source = String::new();
- for line in lines_regex.captures_iter(&text) {
+ for line in lines_regex.captures_iter(text) {
let text = line.get(1).unwrap();
file_source.push_str(&format!("{}\n", text.as_str()));
}
@@ -424,7 +424,7 @@ fn extract_files_from_source_comments(
source: &str,
media_type: &MediaType,
) -> Result<Vec<File>, AnyError> {
- let parsed_module = ast::parse(&specifier.as_str(), &source, &media_type)?;
+ let parsed_module = ast::parse(specifier.as_str(), source, media_type)?;
let mut comments = parsed_module.get_comments();
comments
.sort_by_key(|comment| parsed_module.get_location(&comment.span).line);
@@ -447,7 +447,7 @@ fn extract_files_from_source_comments(
extract_files_from_regex_blocks(
&location,
&comment.text,
- &media_type,
+ media_type,
&blocks_regex,
&lines_regex,
)
@@ -474,8 +474,8 @@ fn extract_files_from_fenced_blocks(
extract_files_from_regex_blocks(
&location,
- &source,
- &media_type,
+ source,
+ media_type,
&blocks_regex,
&lines_regex,
)