Skip to content

Commit 5557ef5

Browse files
Fix new clippy warnings
1 parent ae1099a commit 5557ef5

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/report/analyzer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn analyze_detailed(toolchain: usize, crates: Vec<CrateResult>) -> ReportCrates
4040
let mut root = Vec::new();
4141
for krate in crates {
4242
if let BuildFail(FailureReason::DependsOn(ref deps)) =
43-
(&krate.runs[toolchain]).as_ref().unwrap().res
43+
krate.runs[toolchain].as_ref().unwrap().res
4444
{
4545
for dep in deps {
4646
tree.entry(dep.clone())

src/report/markdown.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct ResultsContext<'a> {
3131
}
3232

3333
fn write_crate(
34-
mut rendered: &mut String,
34+
rendered: &mut String,
3535
krate: &CrateResult,
3636
comparison: Comparison,
3737
is_child: bool,
@@ -76,7 +76,7 @@ fn write_crate(
7676
};
7777

7878
writeln!(
79-
&mut rendered,
79+
rendered,
8080
"{}[{}{}]({}) {} {} **{}** [start]({}/log.txt) | [end]({}/log.txt)",
8181
prefix,
8282
krate.name,
@@ -90,7 +90,7 @@ fn write_crate(
9090
)?;
9191
} else {
9292
writeln!(
93-
&mut rendered,
93+
rendered,
9494
"{}[{}{}]({}) {} [start]({}/log.txt) | [end]({}/log.txt)",
9595
prefix, krate.name, status_warning, krate.url, comparison, runs[1], runs[3]
9696
)?;
@@ -103,10 +103,10 @@ fn render_markdown(context: &ResultsContext) -> Fallible<String> {
103103
let mut rendered = String::new();
104104

105105
//add title
106-
writeln!(&mut rendered, "# Crater report for {}\n\n", context.ex.name)?;
106+
writeln!(rendered, "# Crater report for {}\n\n", context.ex.name)?;
107107

108108
for (comparison, results) in context.categories.iter() {
109-
writeln!(&mut rendered, "\n### {}", comparison)?;
109+
writeln!(rendered, "\n### {}", comparison)?;
110110
match results {
111111
ReportCratesMD::Plain(crates) => {
112112
for krate in crates {
@@ -123,7 +123,7 @@ fn render_markdown(context: &ResultsContext) -> Fallible<String> {
123123

124124
for (krate, deps) in orphans {
125125
writeln!(
126-
&mut rendered,
126+
rendered,
127127
"* [{}]({}) (not covered in crater testing)",
128128
krate,
129129
crate_to_url(krate)

src/server/routes/agent.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub fn routes(
5151
.and(warp::path("next-experiment"))
5252
.and(warp::path::end())
5353
.and(mutex_filter.clone())
54-
.and(github_data_filter.clone())
54+
.and(github_data_filter)
5555
.and(auth_filter(data.clone(), TokenType::Agent))
5656
.map(endpoint_next_experiment);
5757

src/toolchain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ impl FromStr for Toolchain {
118118
for part in parts {
119119
if let Some(equal_idx) = part.find('=') {
120120
let (flag, value_with_equal) = part.split_at(equal_idx);
121-
let value = (&value_with_equal[1..]).to_string();
121+
let value = value_with_equal[1..].to_string();
122122

123123
if value.is_empty() {
124124
return Err(ToolchainParseError::InvalidFlag(flag.to_string()));

0 commit comments

Comments
 (0)