Skip to content

Commit 14f5e38

Browse files
jyn514Joshua Nelson
authored and
Joshua Nelson
committed
Run clippy on all targets
This catches compile errors in the benchmarks.
1 parent da2d33f commit 14f5e38

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
- uses: actions-rs/cargo@v1
135135
with:
136136
command: clippy
137-
args: --workspace --locked -- -D warnings
137+
args: --all-targets --workspace --locked -- -D warnings
138138

139139
- name: Clean unused artifacts
140140
uses: actions-rs/cargo@v1

src/test/fakes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ impl<'a> FakeRelease<'a> {
230230
// Upload all source files as rustdoc files
231231
// In real life, these would be highlighted HTML, but for testing we just use the files themselves.
232232
for (source_path, data) in &self.source_files {
233-
if source_path.starts_with("src/") {
234-
let updated = ["src", &package.name, &source_path[4..]].join("/");
233+
if let Some(src) = source_path.strip_prefix("src/") {
234+
let updated = ["src", &package.name, src].join("/");
235235
rustdoc_files.push((Box::leak(Box::new(updated)), data));
236236
}
237237
}

src/web/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -715,11 +715,11 @@ mod test {
715715
assert_redirect(&format!("/{}", krate), &target, web)?;
716716
assert_redirect(&format!("/{}/", krate), &target, web)?;
717717
}
718-
let target = format!("https://doc.rust-lang.org/stable/proc_macro/");
719718

719+
let target = "https://doc.rust-lang.org/stable/proc_macro/";
720720
// with or without slash
721-
assert_redirect("/proc-macro", &target, web)?;
722-
assert_redirect("/proc-macro/", &target, web)?;
721+
assert_redirect("/proc-macro", target, web)?;
722+
assert_redirect("/proc-macro/", target, web)?;
723723
Ok(())
724724
})
725725
}

0 commit comments

Comments
 (0)