Skip to content

Commit f0c7e81

Browse files
committed
run cargo update and fix fallout
1 parent e35e30c commit f0c7e81

File tree

8 files changed

+1562
-915
lines changed

8 files changed

+1562
-915
lines changed

Cargo.lock

Lines changed: 1545 additions & 899 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/agent/api.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use crate::agent::Capabilities;
22
use crate::crates::Crate;
33
use crate::experiments::Experiment;
44
use crate::prelude::*;
5+
use std::error::Error as _;
56
use crate::results::TestResult;
67
use crate::server::api_types::{AgentConfig, ApiResponse, CraterToken};
78
use crate::toolchain::Toolchain;
@@ -100,7 +101,7 @@ impl AgentApi {
100101
let hyper_io = err
101102
.get_ref()
102103
.and_then(|inner| inner.downcast_ref::<::hyper::Error>())
103-
.and_then(|inner| inner.cause2())
104+
.and_then(|inner| inner.source())
104105
.map(|inner| inner.is::<::std::io::Error>())
105106
.unwrap_or(false);
106107
reqwest_io || hyper_io

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn main() {
2626
env.filter_module("crater", log::LevelFilter::Info);
2727
env.filter_module("rustwide", log::LevelFilter::Info);
2828
if let Ok(content) = std::env::var("RUST_LOG") {
29-
env.parse(&content);
29+
env.parse_filters(&content);
3030
}
3131
rustwide::logging::init_with(env.build());
3232

src/report/display.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ use crate::report::Comparison;
33
use crate::results::{BrokenReason, FailureReason, TestResult};
44

55
pub trait ResultName {
6-
fn name(&self) -> String;
6+
fn short_name(&self) -> String;
77
fn long_name(&self) -> String;
88
}
99

1010
impl ResultName for FailureReason {
11-
fn name(&self) -> String {
11+
fn short_name(&self) -> String {
1212
match self {
1313
FailureReason::Unknown => "failed (unknown)".into(),
1414
FailureReason::Timeout => "timed out".into(),
@@ -25,13 +25,13 @@ impl ResultName for FailureReason {
2525
FailureReason::Unknown
2626
| FailureReason::Timeout
2727
| FailureReason::OOM
28-
| FailureReason::ICE => self.name(),
28+
| FailureReason::ICE => self.short_name(),
2929
}
3030
}
3131
}
3232

3333
impl ResultName for BrokenReason {
34-
fn name(&self) -> String {
34+
fn short_name(&self) -> String {
3535
match self {
3636
BrokenReason::Unknown => "broken crate".into(),
3737
BrokenReason::CargoToml => "broken Cargo.toml".into(),
@@ -41,16 +41,16 @@ impl ResultName for BrokenReason {
4141
}
4242

4343
fn long_name(&self) -> String {
44-
self.name()
44+
self.short_name()
4545
}
4646
}
4747

4848
impl ResultName for TestResult {
49-
fn name(&self) -> String {
49+
fn short_name(&self) -> String {
5050
match self {
51-
TestResult::BrokenCrate(reason) => reason.name(),
52-
TestResult::BuildFail(reason) => format!("build {}", reason.name()),
53-
TestResult::TestFail(reason) => format!("test {}", reason.name()),
51+
TestResult::BrokenCrate(reason) => reason.short_name(),
52+
TestResult::BuildFail(reason) => format!("build {}", reason.short_name()),
53+
TestResult::TestFail(reason) => format!("test {}", reason.short_name()),
5454
TestResult::TestSkipped => "test skipped".into(),
5555
TestResult::TestPass => "test passed".into(),
5656
TestResult::Error => "error".into(),
@@ -66,7 +66,7 @@ impl ResultName for TestResult {
6666
TestResult::TestSkipped
6767
| TestResult::TestPass
6868
| TestResult::Error
69-
| TestResult::Skipped => self.name(),
69+
| TestResult::Skipped => self.short_name(),
7070
}
7171
}
7272
}

src/report/html.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ fn write_report<W: ReportWriter>(
119119
.entry(run.res.clone())
120120
.or_insert_with(|| {
121121
result_colors.push(run.res.color());
122-
result_names.push(run.res.name());
122+
result_names.push(run.res.short_name());
123123
result_names.len() - 1
124124
});
125125
runs[pos] = Some(BuildTestResultHTML {

src/report/markdown.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn write_crate(
4040
if !is_child {
4141
run.res.long_name()
4242
} else {
43-
run.res.name()
43+
run.res.short_name()
4444
}
4545
};
4646

src/server/routes/ui/experiments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ pub fn endpoint_experiment(name: String, data: Arc<Data>) -> Fallible<Response<B
141141
// all CompilerError and DependsOn failures are grouped together
142142
let mut result_counts = HashMap::new();
143143
for (res, count) in ex.get_result_counts(&data.db)? {
144-
*result_counts.entry(res.name()).or_default() += count;
144+
*result_counts.entry(res.short_name()).or_default() += count;
145145
}
146146
let mut result_counts = result_counts.into_iter().collect::<Vec<_>>();
147147
result_counts.sort_by(|v1, v2| (v1.0).cmp(&v2.0));

src/utils/disk_usage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ impl DiskUsage {
1212
let fs = current_mount()?;
1313
Ok(Self {
1414
mount_point: fs.fs_mounted_on.clone(),
15-
usage: (fs.total.as_usize() - fs.free.as_usize()) as f32 / fs.total.as_usize() as f32,
15+
usage: (fs.total.as_u64() - fs.free.as_u64()) as f32 / fs.total.as_u64() as f32,
1616
})
1717
}
1818

0 commit comments

Comments
 (0)